fix(desktop): stop ⌥-click spraying cursor escapes into the terminal

⌥-drag is the app's force-selection gesture over mouse-mode TUIs, but
xterm's default alt-click-moves-cursor claims the same click and emits one
cursor left/right escape per column of travel. Shells that don't consume
them echo the raw `^[[D` burst into the buffer. One gesture, one meaning.
This commit is contained in:
Brooklyn Nicholson 2026-07-30 20:51:40 -05:00
parent 0cec9896a1
commit 4d6589c69c

View file

@ -499,6 +499,11 @@ export function useTerminalSession({
const term = new Terminal({
allowProposedApi: true,
// ⌥-drag is our force-selection gesture (below), and xterm's default
// alt-click-moves-cursor claims the same click, emitting one cursor
// left/right escape per column of travel — shells that don't consume them
// echo the raw `^[[D` burst into the buffer. One gesture, one meaning.
altClickMovesCursor: false,
// Opaque canvas = WebGL's crisp fast-path. allowTransparency instead bakes
// glyphs as grayscale-alpha for compositing over a see-through canvas, which
// reads soft on every platform; VS Code keeps it off and our surface