diff --git a/src/sql/workbench/contrib/notebook/browser/cellToolbarActions.ts b/src/sql/workbench/contrib/notebook/browser/cellToolbarActions.ts index 29c42ec2c8..3156cd1f23 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellToolbarActions.ts +++ b/src/sql/workbench/contrib/notebook/browser/cellToolbarActions.ts @@ -82,6 +82,9 @@ export class SplitCellAction extends CellActionBase { this._register(context.cell.onCurrentEditModeChanged(currentMode => { this.enabled = currentMode === CellEditModes.WYSIWYG ? false : true; })); + this._register(context.cell.notebookModel.onCellTypeChanged(_ => { + this.enabled = context.cell.currentMode === CellEditModes.WYSIWYG ? false : true; + })); } }