提交 e5557b7e 编写于 作者: M Matt Bierner

Reapply c057a4b9

Fixes integration tests
上级 ab529dcd
......@@ -174,11 +174,20 @@ export class CustomEditorService implements ICustomEditorService {
if (group) {
const existingEditors = group.editors.filter(editor => editor.getResource() && isEqual(editor.getResource()!, resource));
if (existingEditors.length) {
const existing = existingEditors[0];
if (existing.matches(input)) {
return;
}
await this.editorService.replaceEditors([{
editor: existingEditors[0],
editor: existing,
replacement: input,
options: options ? EditorOptions.create(options) : undefined,
}], group);
if (existing instanceof CustomFileEditorInput) {
existing.dispose();
}
}
}
return this.editorService.openEditor(input, options, group);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册