Skip to content

Commit 6a8dc7a

Browse files
author
Benjamin Pasero
committed
1 parent 547cf4e commit 6a8dc7a

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/vs/workbench/electron-browser/window.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,18 @@ export class ElectronWindow extends Disposable {
612612
// are closed that the user wants to wait for. When this happens we delete
613613
// the wait marker file to signal to the outside that editing is done.
614614
const listener = this.editorService.onDidCloseEditor(async event => {
615-
const closedResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.MASTER });
615+
const detailsResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.DETAILS });
616+
const masterResource = toResource(event.editor, { supportSideBySide: SideBySideEditor.MASTER });
617+
618+
// Remove from resources to wait for based on the
619+
// resources from editors that got closed
620+
resourcesToWaitFor = resourcesToWaitFor.filter(resourceToWaitFor => {
621+
if (isEqual(resourceToWaitFor, masterResource) || isEqual(resourceToWaitFor, detailsResource)) {
622+
return false; // remove - the closing editor matches this resource
623+
}
616624

617-
// Remove from resources to wait for
618-
resourcesToWaitFor = resourcesToWaitFor.filter(resourceToWaitFor => !isEqual(closedResource, resourceToWaitFor));
625+
return true; // keep - not yet closed
626+
});
619627

620628
if (resourcesToWaitFor.length === 0) {
621629
// If auto save is configured with the default delay (1s) it is possible

0 commit comments

Comments
 (0)