mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Exclude Zen Mode from Editor Tab Actions and Menu Items (#197990)
Updated preconditions for editor tab actions and menu items to exclude Zen Mode
This commit is contained in:
parent
c2abdd2738
commit
55c1e8473c
|
@ -461,7 +461,7 @@ export class HideEditorTabsAction extends Action2 {
|
||||||
original: 'Hide Editor Tabs'
|
original: 'Hide Editor Tabs'
|
||||||
},
|
},
|
||||||
category: Categories.View,
|
category: Categories.View,
|
||||||
precondition: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none').negate(),
|
precondition: ContextKeyExpr.and(ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none').negate(), InEditorZenModeContext.negate()),
|
||||||
f1: true
|
f1: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ export class ShowMultipleEditorTabsAction extends Action2 {
|
||||||
original: 'Show Multiple Editor Tabs'
|
original: 'Show Multiple Editor Tabs'
|
||||||
},
|
},
|
||||||
category: Categories.View,
|
category: Categories.View,
|
||||||
precondition: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple').negate(),
|
precondition: ContextKeyExpr.and(ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple').negate(), InEditorZenModeContext.negate()),
|
||||||
f1: true
|
f1: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,7 @@ export class ShowSingleEditorTabAction extends Action2 {
|
||||||
original: 'Show Single Editor Tab'
|
original: 'Show Single Editor Tab'
|
||||||
},
|
},
|
||||||
category: Categories.View,
|
category: Categories.View,
|
||||||
precondition: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'single').negate(),
|
precondition: ContextKeyExpr.and(ContextKeyExpr.equals('config.workbench.editor.showTabs', 'single').negate(), InEditorZenModeContext.negate()),
|
||||||
f1: true
|
f1: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { IEditorFactoryRegistry, EditorExtensions } from 'vs/workbench/common/ed
|
||||||
import {
|
import {
|
||||||
TextCompareEditorActiveContext, ActiveEditorPinnedContext, EditorGroupEditorsCountContext, ActiveEditorStickyContext, ActiveEditorAvailableEditorIdsContext,
|
TextCompareEditorActiveContext, ActiveEditorPinnedContext, EditorGroupEditorsCountContext, ActiveEditorStickyContext, ActiveEditorAvailableEditorIdsContext,
|
||||||
EditorPartMultipleEditorGroupsContext, ActiveEditorDirtyContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext,
|
EditorPartMultipleEditorGroupsContext, ActiveEditorDirtyContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext,
|
||||||
EditorTabsVisibleContext, ActiveEditorLastInGroupContext, EditorPartMaximizedEditorGroupContext, MultipleEditorGroupsContext
|
EditorTabsVisibleContext, ActiveEditorLastInGroupContext, EditorPartMaximizedEditorGroupContext, MultipleEditorGroupsContext, InEditorZenModeContext
|
||||||
} from 'vs/workbench/common/contextkeys';
|
} from 'vs/workbench/common/contextkeys';
|
||||||
import { SideBySideEditorInput, SideBySideEditorInputSerializer } from 'vs/workbench/common/editor/sideBySideEditorInput';
|
import { SideBySideEditorInput, SideBySideEditorInputSerializer } from 'vs/workbench/common/editor/sideBySideEditorInput';
|
||||||
import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor';
|
import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor';
|
||||||
|
@ -353,7 +353,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_
|
||||||
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_LEFT, title: localize('splitLeft', "Split Left") }, group: '2_split', order: 30 });
|
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_LEFT, title: localize('splitLeft', "Split Left") }, group: '2_split', order: 30 });
|
||||||
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_RIGHT, title: localize('splitRight', "Split Right") }, group: '2_split', order: 40 });
|
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_RIGHT, title: localize('splitRight', "Split Right") }, group: '2_split', order: 40 });
|
||||||
|
|
||||||
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorTabsBarShowTabsSubmenu, title: localize('tabBar', "Tab Bar"), group: '3_config', order: 10 });
|
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorTabsBarShowTabsSubmenu, title: localize('tabBar', "Tab Bar"), group: '3_config', order: 10, when: InEditorZenModeContext.negate() });
|
||||||
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowMultipleEditorTabsAction.ID, title: localize('multipleTabs', "Multiple Tabs"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple') }, group: '1_config', order: 10 });
|
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowMultipleEditorTabsAction.ID, title: localize('multipleTabs', "Multiple Tabs"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple') }, group: '1_config', order: 10 });
|
||||||
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowSingleEditorTabAction.ID, title: localize('singleTab', "Single Tab"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'single') }, group: '1_config', order: 20 });
|
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowSingleEditorTabAction.ID, title: localize('singleTab', "Single Tab"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'single') }, group: '1_config', order: 20 });
|
||||||
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: HideEditorTabsAction.ID, title: localize('hideTabBar', "Hide"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none') }, group: '1_config', order: 30 });
|
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: HideEditorTabsAction.ID, title: localize('hideTabBar', "Hide"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none') }, group: '1_config', order: 30 });
|
||||||
|
|
Loading…
Reference in a new issue