From 07148cbeb9c93c44acbde22256c561766959b06d Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 1 Oct 2019 17:14:01 -0700 Subject: [PATCH] Fix 2nd references without preview. (#4368) * Fix references bugs. --- Extension/src/LanguageServer/client.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 28a857a7ca..6b9a44dfc3 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -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(); } @@ -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(); }