Skip to content

Commit

Permalink
Fix 2nd references without preview. (#4368)
Browse files Browse the repository at this point in the history
* Fix references bugs.
  • Loading branch information
sean-mcmanus authored Oct 2, 2019
1 parent 66b12b8 commit 07148cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,10 @@ export class DefaultClient implements Client {
referencesPendingCancellations.push({ reject, callback });
if (!cancelling) {
renamePending = false;
this.client.references.referencesCanceledIgnoreResults = true;
this.client.references.referencesCanceled = true;
if (!referencesRequestPending) {
this.client.references.referencesCanceledIgnoreResults = true;
}
this.client.languageClient.sendNotification(CancelReferencesNotification);
this.client.references.closeRenameUI();
}
Expand Down Expand Up @@ -760,7 +763,10 @@ export class DefaultClient implements Client {
let cancelling: boolean = referencesPendingCancellations.length > 0;
referencesPendingCancellations.push({ reject: () => { --renameRequestsPending; reject(); }, callback });
if (!cancelling) {
this.client.references.referencesCanceledIgnoreResults = true;
this.client.references.referencesCanceled = true;
if (!referencesRequestPending) {
this.client.references.referencesCanceledIgnoreResults = true;
}
this.client.languageClient.sendNotification(CancelReferencesNotification);
this.client.references.closeRenameUI();
}
Expand Down

0 comments on commit 07148cb

Please sign in to comment.