remove unneeded logic
This commit is contained in:
parent
b466147ca4
commit
82520584ef
1 changed files with 1 additions and 6 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue