提交 b9a04071 编写于 作者: R Rob Lourens

EditorTitle notebook actions should be based on when the editor is visible, not when it's focused.

This method only works because the editortitle actions are not visible when that editor is not active. Otherwise we'd need a new context key.
Fix #101624
上级 6dc0327c
......@@ -349,7 +349,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
},
order: -1,
group: 'navigation',
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EXECUTING_NOTEBOOK.toNegated(), NOTEBOOK_EDITOR_RUNNABLE)
when: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EXECUTING_NOTEBOOK.toNegated(), NOTEBOOK_EDITOR_RUNNABLE)
});
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
......@@ -360,7 +360,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
},
order: -1,
group: 'navigation',
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EXECUTING_NOTEBOOK)
when: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EXECUTING_NOTEBOOK)
});
registerAction2(class extends NotebookAction {
......@@ -1236,7 +1236,7 @@ registerAction2(class extends NotebookAction {
title: localize('clearAllCellsOutputs', 'Clear All Cells Outputs'),
menu: {
id: MenuId.EditorTitle,
when: NOTEBOOK_EDITOR_FOCUSED,
when: NOTEBOOK_IS_ACTIVE_EDITOR,
group: 'navigation',
order: 0
},
......
......@@ -24,7 +24,7 @@ registerAction2(class extends Action2 {
icon: { id: 'codicon/server-environment' },
menu: {
id: MenuId.EditorTitle,
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_HAS_MULTIPLE_KERNELS),
when: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_HAS_MULTIPLE_KERNELS),
group: 'navigation',
order: -2,
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册