diff --git a/src/vs/workbench/contrib/terminal/browser/terminalView.ts b/src/vs/workbench/contrib/terminal/browser/terminalView.ts index d2f42f47998..596a05c71e9 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalView.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalView.ts @@ -137,7 +137,6 @@ export class TerminalViewPane extends ViewPane { if (this._terminalsInitialized) { if (!hadTerminals) { this._terminalService.createTerminal({ location: TerminalLocation.Panel }); - this._terminalGroupService.showPanel(true); } } else { this._terminalsInitialized = true; @@ -146,6 +145,11 @@ export class TerminalViewPane extends ViewPane { } else { this._onDidChangeViewWelcomeState.fire(); } + if (!this._terminalService.activeInstance?.shellLaunchConfig.extHostTerminalId) { + // showPanel is already called with !preserveFocus + // when extension host terminals are created + this._terminalGroupService.showPanel(true); + } if (hadTerminals) { this._terminalGroupService.activeGroup?.setVisible(visible);