File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ export function TerminalView(props: TerminalViewProps) {
9191 fitAddon = new FitAddon ( ) ;
9292 term . loadAddon ( fitAddon ) ;
9393 term . loadAddon (
94- new WebLinksAddon ( ( _event , uri ) => {
94+ new WebLinksAddon ( ( event , uri ) => {
95+ // Require Cmd+click (Mac) or Ctrl+click (Linux) to open links
96+ if ( ! ( isMac ? event . metaKey : event . ctrlKey ) ) return ;
9597 try {
9698 const parsed = new URL ( uri ) ;
9799 if ( parsed . protocol === 'http:' || parsed . protocol === 'https:' ) {
@@ -140,6 +142,9 @@ export function TerminalView(props: TerminalViewProps) {
140142 } ,
141143 text : link . text ,
142144 activate ( event : MouseEvent , _text : string ) {
145+ // Require Cmd+click (Mac) or Ctrl+click (Linux) to open links
146+ const modifierHeld = isMac ? event . metaKey : event . ctrlKey ;
147+ if ( ! modifierHeld ) return ;
143148 // Strip line:col suffix for opening
144149 const filePath = link . text . replace ( / : \d + ( : \d + ) ? $ / , '' ) ;
145150 // Resolve relative paths against the task's working directory
You can’t perform that action at this time.
0 commit comments