Skip to content

Commit 07148cb

Browse files
authored
Fix 2nd references without preview. (#4368)
* Fix references bugs.
1 parent 66b12b8 commit 07148cb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,10 @@ export class DefaultClient implements Client {
676676
referencesPendingCancellations.push({ reject, callback });
677677
if (!cancelling) {
678678
renamePending = false;
679-
this.client.references.referencesCanceledIgnoreResults = true;
679+
this.client.references.referencesCanceled = true;
680+
if (!referencesRequestPending) {
681+
this.client.references.referencesCanceledIgnoreResults = true;
682+
}
680683
this.client.languageClient.sendNotification(CancelReferencesNotification);
681684
this.client.references.closeRenameUI();
682685
}
@@ -760,7 +763,10 @@ export class DefaultClient implements Client {
760763
let cancelling: boolean = referencesPendingCancellations.length > 0;
761764
referencesPendingCancellations.push({ reject: () => { --renameRequestsPending; reject(); }, callback });
762765
if (!cancelling) {
763-
this.client.references.referencesCanceledIgnoreResults = true;
766+
this.client.references.referencesCanceled = true;
767+
if (!referencesRequestPending) {
768+
this.client.references.referencesCanceledIgnoreResults = true;
769+
}
764770
this.client.languageClient.sendNotification(CancelReferencesNotification);
765771
this.client.references.closeRenameUI();
766772
}

0 commit comments

Comments
 (0)