From c905403afca23b53407e5152e8ecaa36364d673f Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 11 Aug 2021 16:03:22 -0700 Subject: [PATCH] Don't hide "run above" and "run below" command while in a run-by-line session --- .../notebook/browser/contrib/coreActions.ts | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts b/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts index ba29941e2b9..b09819a57f0 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts @@ -304,14 +304,17 @@ export abstract class NotebookCellAction extends } // If this changes, update getCodeCellExecutionContextKeyService to match -const executeCellCondition = ContextKeyExpr.and( +const executeCondition = ContextKeyExpr.and( NOTEBOOK_CELL_TYPE.isEqualTo('code'), - NOTEBOOK_CELL_EXECUTING.toNegated(), ContextKeyExpr.or( ContextKeyExpr.greater(NOTEBOOK_KERNEL_COUNT.key, 0), NOTEBOOK_MISSING_KERNEL_EXTENSION )); +const executeThisCellCondition = ContextKeyExpr.and( + executeCondition, + NOTEBOOK_CELL_EXECUTING.toNegated()); + const executeNotebookCondition = ContextKeyExpr.greater(NOTEBOOK_KERNEL_COUNT.key, 0); interface IMultiCellArgs { @@ -412,13 +415,13 @@ registerAction2(class ExecuteAboveCells extends NotebookMultiCellAction