remove unneeded logic

This commit is contained in:
meganrogge 2021-04-26 14:39:36 -07:00
parent b466147ca4
commit 82520584ef
No known key found for this signature in database
GPG key ID: 3155C8B2F0428C81

View file

@ -126,12 +126,7 @@ export class TerminalTabsWidget extends WorkbenchObjectTree<ITerminalInstance>
});
this.onDidChangeFocus(e => {
// catch the case when multiple elements are selected and one is focused (with a right click)
// that is not in the selection. this ensures that the menu will show the instance actions for the focused element
// and apply only to that
const focusIsSelection = e.elements.length === 1 && this.getFocus()?.length === 1 && e.elements[0] === this.getFocus()[0];
const selectionExcludesFocusedElement = e.elements.length === 1 && !this.getSelection().includes(e.elements[0]);
this._terminalTabsSingleSelectedContextKey.set(selectionExcludesFocusedElement || focusIsSelection);
this._terminalTabsSingleSelectedContextKey.set(e.elements.length === 1);
});
this.onDidOpen(async e => {