mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
fix #120824
This commit is contained in:
parent
e956e0a0ee
commit
3702538139
1 changed files with 10 additions and 1 deletions
|
@ -66,10 +66,19 @@ export class TerminalTabsWidget extends WorkbenchObjectTree<ITabTreeNode> {
|
|||
}
|
||||
}
|
||||
});
|
||||
this._terminalService = terminalService;
|
||||
|
||||
this._terminalService = terminalService;
|
||||
terminalService.onInstancesChanged(() => this._render());
|
||||
terminalService.onInstanceTitleChanged(() => this._render());
|
||||
terminalService.onActiveTabChanged(() => {
|
||||
const selection = this.getSelection();
|
||||
const selectedTab = selection[0] as ITerminalTab;
|
||||
const activeTab = terminalService.getActiveTab();
|
||||
if (activeTab && terminalService.terminalTabs.indexOf(selectedTab) !== terminalService.activeTabIndex) {
|
||||
this.setFocus([activeTab]);
|
||||
this.setSelection([activeTab]);
|
||||
}
|
||||
});
|
||||
|
||||
this._render();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue