From 40d5667e634f466488c041f6af83f6277b2a0d5f Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Wed, 28 Aug 2019 11:49:57 -0700 Subject: [PATCH] Don't Inform extHostNotebookDocuments Unnecessarily on Cell Source Changes (#6981) * Dont tell exthostnotebookdocuments on cell source * Update comment --- .../api/browser/mainThreadNotebookDocumentsAndEditors.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.ts b/src/sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.ts index f14e84749b..fa3baaaf9d 100644 --- a/src/sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.ts +++ b/src/sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.ts @@ -574,7 +574,12 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements addedEditors.forEach(editor => { let modelUrl = editor.uri; const store = new DisposableStore(); - store.add(editor.contentChanged((e) => this._proxy.$acceptModelChanged(modelUrl, this._toNotebookChangeData(e, editor)))); + store.add(editor.contentChanged((e) => { + // Cell source updates are handled by vscode editor updates in main/extHost Documents + if (e.changeType !== NotebookChangeType.CellSourceUpdated) { + this._proxy.$acceptModelChanged(modelUrl, this._toNotebookChangeData(e, editor)); + } + })); this._modelToDisposeMap.set(editor.uri.toString(), store); }); }