dont execute from outside the REPL
parent
49c4b2caa0
commit
0aa6cb14ef
|
@ -453,11 +453,15 @@ registerAction2(class extends Action2 {
|
|||
category: interactiveWindowCategory,
|
||||
keybinding: [{
|
||||
// when: NOTEBOOK_CELL_LIST_FOCUSED,
|
||||
when: ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive'),
|
||||
when: ContextKeyExpr.and(
|
||||
IS_COMPOSITE_NOTEBOOK,
|
||||
ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive')
|
||||
),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
||||
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
||||
}, {
|
||||
when: ContextKeyExpr.and(
|
||||
IS_COMPOSITE_NOTEBOOK,
|
||||
ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive'),
|
||||
ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', true)
|
||||
),
|
||||
|
@ -465,6 +469,7 @@ registerAction2(class extends Action2 {
|
|||
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
||||
}, {
|
||||
when: ContextKeyExpr.and(
|
||||
IS_COMPOSITE_NOTEBOOK,
|
||||
ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive'),
|
||||
ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', false)
|
||||
),
|
||||
|
|
|
@ -338,11 +338,15 @@ registerAction2(class extends Action2 {
|
|||
title: localize2('repl.execute', 'Execute REPL input'),
|
||||
category: 'REPL',
|
||||
keybinding: [{
|
||||
when: ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl'),
|
||||
when: ContextKeyExpr.and(
|
||||
IS_COMPOSITE_NOTEBOOK,
|
||||
ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl')
|
||||
),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
||||
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
||||
}, {
|
||||
when: ContextKeyExpr.and(
|
||||
IS_COMPOSITE_NOTEBOOK,
|
||||
ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl'),
|
||||
ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', true)
|
||||
),
|
||||
|
@ -350,6 +354,7 @@ registerAction2(class extends Action2 {
|
|||
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
||||
}, {
|
||||
when: ContextKeyExpr.and(
|
||||
IS_COMPOSITE_NOTEBOOK,
|
||||
ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl'),
|
||||
ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', false)
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue