diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts index 0a7c21cf9be..06563a5b82a 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts @@ -224,8 +224,10 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod this.textModel = ref.object.textEditorModel; this._register(ref); this._register(this.textModel.onDidChangeContent(() => { - this.editState = CellEditState.Editing; - this._onDidChangeState.fire({ contentChanged: true }); + if (this.editState !== CellEditState.Editing) { + this.editState = CellEditState.Editing; + this._onDidChangeState.fire({ contentChanged: true }); + } })); }