You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Ctrl+click on a link in a mouse-tracking pane opens it in both the wmux panel and the system browser #353
In a pane where the running program has turned on mouse tracking (for example Claude Code's full-screen UI), Ctrl+click on a link opens it twice: once in the wmux browser panel and once in the system browser.
Steps to reproduce
Run Claude Code in a wmux terminal pane (native Windows shell, wmux 2.40.0).
Expected: the link opens once, in the wmux browser panel (the default destination).
Actual: the link opens in the wmux browser panel and in the system default browser.
Cause
Since #280, linkClickTarget in src/renderer/utils/terminal-links.ts treats Ctrl+click in a mouse-tracking pane as wmux's, and wmux opens the link. But xterm still reports that Ctrl+click to the app. xterm's always-on mousedown listener in CoreBrowserTerminal._bindMouse only skips reporting when shouldForceSelection is true (Shift, or Alt on macOS), and the report includes the Ctrl modifier. An app that opens links on Ctrl+click then opens the same URL itself, in the system browser.
This is the same "two openers, neither can see the other" problem as #280, moved from the plain click to the modified click. #340's BROWSER routing does not cover it: it applies only to WSL panes, and the app opens the link itself on the click, not through wmux.
Proposed fix
When wmux takes a Ctrl/Cmd+click on a link in a mouse-tracking pane, it should not report that click to the app. A capture-phase mousedown/mouseup listener on the terminal container can stop the event before xterm's reporter sees it, but only when a link is under the pointer (tracked with the link providers' hover/leave callbacks), and then activate the link itself. Plain clicks, clicks that are not on a link, and panes without mouse tracking are unchanged.
Activity
fix(terminal): keep a Ctrl+click wmux opens from reaching a mouse-tra…
amirlehmam commentedon Oct 25, 2026
Shipped in v2.41.0.