aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/inlay_hints.ts
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-03-21 22:40:07 +0000
committerKirill Bulatov <[email protected]>2020-03-30 11:39:14 +0100
commitb892a48740eef7a505bfbe2213c42c71e87f0bea (patch)
tree8f7115e538c3b21407eb17c604636eb3bb6362c8 /editors/code/src/inlay_hints.ts
parent590af37bff2b5ec9a692f2468c98acf7f9f492c0 (diff)
Code review fixes
Co-Authored-By: Veetaha <[email protected]>
Diffstat (limited to 'editors/code/src/inlay_hints.ts')
-rw-r--r--editors/code/src/inlay_hints.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts
index 98663e0e3..6a8bd942e 100644
--- a/editors/code/src/inlay_hints.ts
+++ b/editors/code/src/inlay_hints.ts
@@ -17,9 +17,11 @@ export function activateInlayHints(ctx: Ctx) {
17 ) { 17 ) {
18 return this.dispose(); 18 return this.dispose();
19 } 19 }
20 if (!this.updater) this.updater = new HintsUpdater(ctx); 20 if (this.updater) {
21 21 this.updater.syncCacheAndRenderHints();
22 this.updater.syncCacheAndRenderHints(); 22 } else {
23 this.updater = new HintsUpdater(ctx);
24 }
23 }, 25 },
24 dispose() { 26 dispose() {
25 this.updater?.dispose(); 27 this.updater?.dispose();
@@ -126,7 +128,7 @@ class HintsUpdater implements Disposable {
126 this.syncCacheAndRenderHints(); 128 this.syncCacheAndRenderHints();
127 } 129 }
128 130
129 public syncCacheAndRenderHints() { 131 syncCacheAndRenderHints() {
130 // FIXME: make inlayHints request pass an array of files? 132 // FIXME: make inlayHints request pass an array of files?
131 this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => { 133 this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => {
132 if (!hints) return; 134 if (!hints) return;