Privatize highlighting

This commit is contained in:
Aleksey Kladov 2019-12-30 23:12:33 +01:00
parent cdd7118cbf
commit 233f1dd2a8
8 changed files with 54 additions and 48 deletions

View file

@ -102,7 +102,7 @@ class HintsUpdater {
};
let tokenSource = new vscode.CancellationTokenSource();
let prev = this.pending.get(documentUri);
if (prev) prev.cancel()
if (prev) prev.cancel();
this.pending.set(documentUri, tokenSource);
try {
return await this.ctx.sendRequestWithRetry<InlayHint[] | null>(
@ -112,7 +112,7 @@ class HintsUpdater {
);
} finally {
if (!tokenSource.token.isCancellationRequested) {
this.pending.delete(documentUri)
this.pending.delete(documentUri);
}
}
}