mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
Dispose underlying text model when disposing notebook editor model (#19955)
This commit is contained in:
@@ -77,6 +77,7 @@ export class NotebookEditorModel extends EditorModel {
|
||||
}, err => undefined);
|
||||
}
|
||||
}));
|
||||
this._register(this.textEditorModel);
|
||||
if (this.textEditorModel instanceof UntitledTextEditorModel) {
|
||||
this._register(this.textEditorModel.onDidChangeDirty(e => {
|
||||
let dirty = this.textEditorModel instanceof TextResourceEditorModel ? false : this.textEditorModel.isDirty();
|
||||
@@ -420,6 +421,7 @@ export abstract class NotebookInput extends EditorInput implements INotebookInpu
|
||||
}
|
||||
} else {
|
||||
const textEditorModelReference = await this.textModelService.createModelReference(this.resource);
|
||||
this._register(textEditorModelReference);
|
||||
textEditorModelReference.object.textEditorModel.onBeforeAttached();
|
||||
await textEditorModelReference.object.resolve();
|
||||
textOrUntitledEditorModel = textEditorModelReference.object as TextFileEditorModel | TextResourceEditorModel;
|
||||
|
||||
Reference in New Issue
Block a user