mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
fix #115931
This commit is contained in:
parent
152ccfbf3a
commit
d68691c444
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue