File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/vs/workbench/contrib/terminalContrib/history/browser Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,10 @@ registerTerminalAction({
147
147
}
148
148
] ,
149
149
run : async ( c , accessor ) => {
150
+ // If there are no active instances, then create a new terminal instance
150
151
const activeInstance = await c . service . getActiveOrCreateInstance ( ) ;
152
+ // Newly created instances will not have a shell type set yet
153
+ // This will result in the command picker not showing up, so wait for it to be set
151
154
if ( ! activeInstance . shellType ) {
152
155
await c . service . revealActiveTerminal ( ) ;
153
156
const wasDisposedPrematurely = await new Promise < boolean > ( resolve => {
@@ -158,6 +161,7 @@ registerTerminalAction({
158
161
resolve ( true ) ;
159
162
} ) ;
160
163
} ) ;
164
+ // If the instance was disposed before the shell type was set, then exit
161
165
if ( wasDisposedPrematurely ) {
162
166
return ;
163
167
}
You can’t perform that action at this time.
0 commit comments