提交 6a8dc7ad 编写于 作者: B Benjamin Pasero

fix #75861 (#89908)

上级 547cf4e8
......@@ -612,10 +612,18 @@ export class ElectronWindow extends Disposable {
// are closed that the user wants to wait for. When this happens we delete
// the wait marker file to signal to the outside that editing is done.
const listener = this.editorService.onDidCloseEditor(async event => {
const closedResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.MASTER });
const detailsResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.DETAILS });
const masterResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.MASTER });
// Remove from resources to wait for based on the
// resources from editors that got closed
resourcesToWaitFor = resourcesToWaitFor.filter(resourceToWaitFor => {
if (isEqual(resourceToWaitFor, masterResource) || isEqual(resourceToWaitFor, detailsResource)) {
return false; // remove - the closing editor matches this resource
}
// Remove from resources to wait for
resourcesToWaitFor = resourcesToWaitFor.filter(resourceToWaitFor => !isEqual(closedResource, resourceToWaitFor));
return true; // keep - not yet closed
});
if (resourcesToWaitFor.length === 0) {
// If auto save is configured with the default delay (1s) it is possible
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册