mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
Make sure we dispose of any custom editor inputs when replacing them
Fixes #81773
This commit is contained in:
parent
a25c6e6660
commit
c057a4b9c7
|
@ -179,6 +179,12 @@ export class CustomEditorService implements ICustomEditorService {
|
|||
replacement: input,
|
||||
options: options ? EditorOptions.create(options) : undefined,
|
||||
}], group);
|
||||
|
||||
for (const editor of existingEditors) {
|
||||
if (editor instanceof CustomFileEditorInput) {
|
||||
editor.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.editorService.openEditor(input, options, group);
|
||||
|
|
Loading…
Reference in a new issue