Skip to content

Commit a749947

Browse files
committed
Fix Multiple Find All References progress UIs getting stuck
1 parent 5f2444a commit a749947

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

Extension/src/LanguageServer/references.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ export class ReferencesManager {
346346
}
347347

348348
private handleProgressStarted(referencesProgress: ReferencesProgress): void {
349+
this.resetProgressBar();
349350
this.referencesStartedWhileTagParsing = this.client.IsTagParsing;
350351

351352
let mode: ReferencesCommandMode = ReferencesCommandMode.None;
@@ -436,18 +437,18 @@ export class ReferencesManager {
436437
public resetProgressBar(): void {
437438
if (this.referencesDelayProgress) {
438439
clearInterval(this.referencesDelayProgress);
440+
this.referencesDelayProgress = undefined;
439441
}
440442
if (this.currentUpdateProgressTimer) {
441-
if (this.currentUpdateProgressTimer) {
442-
clearInterval(this.currentUpdateProgressTimer);
443-
}
444-
if (this.currentUpdateProgressResolve) {
445-
this.currentUpdateProgressResolve(undefined);
446-
}
447-
this.currentUpdateProgressResolve = undefined;
443+
clearInterval(this.currentUpdateProgressTimer);
448444
this.currentUpdateProgressTimer = undefined;
449445
}
446+
if (this.currentUpdateProgressResolve) {
447+
this.currentUpdateProgressResolve(undefined);
448+
this.currentUpdateProgressResolve = undefined;
449+
}
450450
this.referencesProgressBarStartTime = 0;
451+
this.referencesCurrentProgress = undefined;
451452
}
452453

453454
public startRename(): void {

0 commit comments

Comments
 (0)