mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
use updateState/compute instead of sending delta directly.
This commit is contained in:
@@ -171,8 +171,9 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
||||
this._addNotebookEditor(editor);
|
||||
}));
|
||||
|
||||
this._register(this._notebookService.onNotebookEditorRemove(editor => {
|
||||
this._removeNotebookEditor(editor);
|
||||
|
||||
this._register(this._notebookService.onNotebookDocumentRemove(() => {
|
||||
this._updateState();
|
||||
}));
|
||||
|
||||
const updateOrder = () => {
|
||||
@@ -201,9 +202,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
||||
}
|
||||
|
||||
async addNotebookDocument(data: INotebookModelAddedData) {
|
||||
await this._proxy.$acceptDocumentAndEditorsDelta({
|
||||
addedDocuments: [data]
|
||||
});
|
||||
this._updateState();
|
||||
}
|
||||
|
||||
private _addNotebookEditor(e: IEditor) {
|
||||
|
||||
Reference in New Issue
Block a user