Don't Inform extHostNotebookDocuments Unnecessarily on Cell Source Changes (#6981)

* Dont tell exthostnotebookdocuments on cell source

* Update comment
This commit is contained in:
Chris LaFreniere
2019-08-28 11:49:57 -07:00
committed by GitHub
parent 953bd064bc
commit 40d5667e63

View File

@@ -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);
});
}