mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 10:58:34 -05:00
Fixes another infinite loop in close command
This commit is contained in:
@@ -47,8 +47,13 @@ export class CloseUnchangedFilesCommand extends ActiveEditorCommand {
|
|||||||
|
|
||||||
if (editor.document !== undefined &&
|
if (editor.document !== undefined &&
|
||||||
(editor.document.isDirty || args.uris.some(_ => UriComparer.equals(_, editor!.document && editor!.document.uri)))) {
|
(editor.document.isDirty || args.uris.some(_ => UriComparer.equals(_, editor!.document && editor!.document.uri)))) {
|
||||||
|
const lastPrevious = previous;
|
||||||
previous = editor;
|
previous = editor;
|
||||||
editor = await editorTracker.awaitNext(500);
|
editor = await editorTracker.awaitNext(500);
|
||||||
|
|
||||||
|
if (TextEditorComparer.equals(lastPrevious, editor, { useId: true, usePosition: true })) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user