From 30d699fa104f30fc78b9f597cfa92683c1cf6c8a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 Mar 2021 11:11:11 +0100 Subject: [PATCH] on fire active notebook change event when something changed, https://github.com/microsoft/vscode/issues/118470 --- src/vs/workbench/api/common/extHostNotebook.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index c027bc91d59..254a0ba8cca 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -776,7 +776,9 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { } else if (delta.newActiveEditor) { this._activeNotebookEditor = this._editors.get(delta.newActiveEditor)?.editor; } - this._onDidChangeActiveNotebookEditor.fire(this._activeNotebookEditor?.editor); + if (delta.newActiveEditor !== undefined) { + this._onDidChangeActiveNotebookEditor.fire(this._activeNotebookEditor?.editor); + } } createNotebookCellStatusBarItemInternal(cell: vscode.NotebookCell, alignment: extHostTypes.NotebookCellStatusBarAlignment | undefined, priority: number | undefined) {