only focus when showing panel if active instance is not an extHost terminal

This commit is contained in:
Megan Rogge 2021-11-21 08:53:14 -08:00
parent 2e636ded90
commit 6729fbbc86
No known key found for this signature in database
GPG key ID: 69182D7934F25879

View file

@ -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);