提交 de7ae41c 编写于 作者: B Benjamin Pasero

Staging dirty new or existing file removes dirty editor (fixes #8303)

上级 58ad1168
......@@ -212,7 +212,6 @@ class EditorInputCache
if (editorInputPromise) {
editorInputPromise.done((editorInput) => { this.eventuallyDispose(editorInput); });
delete this.cache[id];
}
}
......@@ -232,7 +231,7 @@ class EditorInputCache
}
private maybeDispose(editorInput: WorkbenchEditorCommon.EditorInput): boolean {
if (!this.editorService.getVisibleEditors().some((editor) => editor.input && editor.input.matches(editorInput))) {
if (!editorInput.isDirty() && !this.editorService.getVisibleEditors().some((editor) => editor.input && editor.input.matches(editorInput))) {
editorInput.dispose();
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册