diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index d60983725cabdbf9fec3fe70f377c4fb3f75c522..4c2fbffde2a90a57486b364262e667829a6a1fec 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);