mirror of
https://github.com/Microsoft/vscode
synced 2024-08-25 03:56:03 +00:00
dispose saved text model with wrong view type (#209461)
This commit is contained in:
parent
fb7f833668
commit
23860e98f0
|
@ -209,7 +209,11 @@ export class InteractiveEditorInput extends EditorInput implements ICompositeNot
|
|||
return undefined; // save cancelled
|
||||
}
|
||||
|
||||
return await this._editorModelReference.saveAs(target);
|
||||
const saved = await this._editorModelReference.saveAs(target);
|
||||
if (saved && 'resource' in saved && saved.resource) {
|
||||
this._notebookService.getNotebookTextModel(saved.resource)?.dispose();
|
||||
}
|
||||
return saved;
|
||||
}
|
||||
|
||||
override matches(otherInput: EditorInput | IUntypedEditorInput): boolean {
|
||||
|
|
Loading…
Reference in a new issue