mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Fix #98841. Open file should only emit document open event, no cells change event.
This commit is contained in:
@@ -476,14 +476,16 @@ export class MainThreadNotebookController implements IMainNotebookController {
|
||||
document.textModel.metadata = backup.metadata;
|
||||
document.textModel.languages = backup.languages;
|
||||
|
||||
// restored from backup, update the text model without emitting any event to exthost
|
||||
document.textModel.$applyEdit(document.textModel.versionId, [
|
||||
{
|
||||
editType: CellEditType.Insert,
|
||||
index: 0,
|
||||
cells: backup.cells || []
|
||||
}
|
||||
]);
|
||||
], false);
|
||||
|
||||
// create document in ext host with cells data
|
||||
await this._mainThreadNotebook.addNotebookDocument({
|
||||
viewType: document.viewType,
|
||||
handle: document.handle,
|
||||
|
||||
Reference in New Issue
Block a user