diff --git a/src/vs/workbench/contrib/terminal/browser/terminalView.ts b/src/vs/workbench/contrib/terminal/browser/terminalView.ts index 0638edb649d..7674a991804 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalView.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalView.ts @@ -353,7 +353,7 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) = class SwitchTerminalActionViewItem extends SelectActionViewItem { private _lastOptions: ISelectOptionItem[] = []; - + private _lastActiveTab: number = 0; constructor( action: IAction, @ITerminalService private readonly _terminalService: ITerminalService, @@ -382,9 +382,10 @@ class SwitchTerminalActionViewItem extends SelectActionViewItem { private _updateItems(): void { const options = getTerminalSelectOpenItems(this._terminalService, this._contributions); // only update options if they've changed - if (!equals(Object.values(options), Object.values(this._lastOptions))) { + if (!equals(Object.values(options), Object.values(this._lastOptions)) || this._lastActiveTab !== this._terminalService.activeTabIndex) { this.setOptions(options, this._terminalService.activeTabIndex); this._lastOptions = options; + this._lastActiveTab = this._terminalService.activeTabIndex; } } }