From 4d6589c69c1ea89a1c12aef8f8cf42c638c313dc Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Thu, 30 Jul 2026 20:51:40 -0500 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20stop=20=E2=8C=A5-click=20sprayi?= =?UTF-8?q?ng=20cursor=20escapes=20into=20the=20terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⌥-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. --- .../src/app/right-sidebar/terminal/use-terminal-session.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts b/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts index d60bb71bdd4..888d197a55a 100644 --- a/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts +++ b/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts @@ -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