Make sure we dispose of any custom editor inputs when replacing them

Fixes #81773
This commit is contained in:
Matt Bierner 2019-10-01 17:09:46 -07:00
parent a25c6e6660
commit c057a4b9c7

View file

@ -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);