@@ -63,6 +63,7 @@ import { killTerminalIcon, newTerminalIcon } from './terminalIcons.js';
6363import { ITerminalQuickPickItem } from './terminalProfileQuickpick.js' ;
6464import { TerminalTabList } from './terminalTabsList.js' ;
6565import { ResourceContextKey } from '../../../common/contextkeys.js' ;
66+ import { timeout } from '../../../../base/common/async.js' ;
6667
6768export const switchTerminalActionViewItemSeparator = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500' ;
6869export const switchTerminalShowTabsTitle = localize ( 'showTerminalTabs' , "Show Tabs" ) ;
@@ -329,7 +330,9 @@ export function registerTerminalActions() {
329330 // called when a terminal is the active editor
330331 const editorGroupsService = accessor . get ( IEditorGroupsService ) ;
331332 const instance = await c . service . createTerminal ( {
332- location : { viewColumn : editorGroupToColumn ( editorGroupsService , editorGroupsService . activeGroup ) }
333+ location : {
334+ viewColumn : editorGroupToColumn ( editorGroupsService , editorGroupsService . activeGroup ) ,
335+ }
333336 } ) ;
334337 await instance . focusWhenReady ( ) ;
335338 }
@@ -363,6 +366,12 @@ export function registerTerminalActions() {
363366 } ,
364367 } ) ;
365368 await instance . focusWhenReady ( ) ;
369+ // HACK: Since it's a new window it should be unlocked, despite the configuration, this
370+ // is using a timeout as it's auto locked after several events firing in code internal
371+ // to the editor.
372+ await timeout ( 100 ) ;
373+ const g = c . editorService . getInputFromResource ( instance . resource ) . group ;
374+ g ?. lock ( false ) ;
366375 }
367376 } ) ;
368377
0 commit comments