diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index 683823daa932a876fb0a13df38149f310d925328..a9ce914cdfed5db80b4a46fa89e2ff883f803090 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -931,6 +931,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN } const onDidReceiveMessage = new Emitter(); + const document = this._documents.get(revivedUri.toString())!; let editor = new ExtHostNotebookEditor( viewType, @@ -938,10 +939,12 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN revivedUri, this._proxy, onDidReceiveMessage, - this._documents.get(revivedUri.toString())!, + document, this._documentsAndEditors ); + this._onDidOpenNotebookDocument.fire(document); + // TODO, does it already exist? this._editors.set(revivedUri.toString(), { editor, onDidReceiveMessage }); });