@@ -63,6 +63,7 @@ import { killTerminalIcon, newTerminalIcon } from './terminalIcons.js';
63
63
import { ITerminalQuickPickItem } from './terminalProfileQuickpick.js' ;
64
64
import { TerminalTabList } from './terminalTabsList.js' ;
65
65
import { ResourceContextKey } from '../../../common/contextkeys.js' ;
66
+ import { timeout } from '../../../../base/common/async.js' ;
66
67
67
68
export const switchTerminalActionViewItemSeparator = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500' ;
68
69
export const switchTerminalShowTabsTitle = localize ( 'showTerminalTabs' , "Show Tabs" ) ;
@@ -329,7 +330,9 @@ export function registerTerminalActions() {
329
330
// called when a terminal is the active editor
330
331
const editorGroupsService = accessor . get ( IEditorGroupsService ) ;
331
332
const instance = await c . service . createTerminal ( {
332
- location : { viewColumn : editorGroupToColumn ( editorGroupsService , editorGroupsService . activeGroup ) }
333
+ location : {
334
+ viewColumn : editorGroupToColumn ( editorGroupsService , editorGroupsService . activeGroup ) ,
335
+ }
333
336
} ) ;
334
337
await instance . focusWhenReady ( ) ;
335
338
}
@@ -363,6 +366,12 @@ export function registerTerminalActions() {
363
366
} ,
364
367
} ) ;
365
368
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 ) ;
366
375
}
367
376
} ) ;
368
377
0 commit comments