Fixes another infinite loop in close command

This commit is contained in:
Eric Amodio
2017-06-27 01:16:02 -04:00
parent f9275a8e1a
commit 93ea2c7145

View File

@@ -47,8 +47,13 @@ export class CloseUnchangedFilesCommand extends ActiveEditorCommand {
if (editor.document !== undefined &&
(editor.document.isDirty || args.uris.some(_ => UriComparer.equals(_, editor!.document && editor!.document.uri)))) {
const lastPrevious = previous;
previous = editor;
editor = await editorTracker.awaitNext(500);
if (TextEditorComparer.equals(lastPrevious, editor, { useId: true, usePosition: true })) {
break;
}
continue;
}
}