From 1cbacf4b6a9fc3b0101223d9cc33345a2682d44b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 17 Jan 2018 08:22:54 +0100 Subject: [PATCH] restore "..." menu for inactive editor groups --- .../workbench/browser/parts/editor/titleControl.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index d60983725ca..4c2fbffde2a 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -310,7 +310,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl const titleBarMenu = this.menuService.createMenu(MenuId.EditorTitle, scopedContextKeyService); this.disposeOnEditorActions.push(titleBarMenu, titleBarMenu.onDidChange(_ => this.update())); - fillInActions(titleBarMenu, { arg: this.resourceContext.get() }, { primary, secondary }, this.contextMenuService); + fillInActions(titleBarMenu, { arg: this.resourceContext.get(), shouldForwardArgs: true }, { primary, secondary }, this.contextMenuService); } return { primary, secondary }; @@ -328,16 +328,20 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl // Update Editor Actions Toolbar let primaryEditorActions: IAction[] = []; let secondaryEditorActions: IAction[] = []; + + const editorActions = this.getEditorActions({ group, editor }); + + // Primary actions only for the active group if (isActive) { - const editorActions = this.getEditorActions({ group, editor }); primaryEditorActions = prepareActions(editorActions.primary); - if (isActive && editor instanceof EditorInput && editor.supportsSplitEditor()) { + if (editor instanceof EditorInput && editor.supportsSplitEditor()) { this.updateSplitActionEnablement(); primaryEditorActions.push(this.splitEditorAction); } - secondaryEditorActions = prepareActions(editorActions.secondary); } + secondaryEditorActions = prepareActions(editorActions.secondary); + const tabOptions = this.editorGroupService.getTabOptions(); const primaryEditorActionIds = primaryEditorActions.map(a => a.id); -- GitLab