diff options
Diffstat (limited to 'editors/code/src/inlay_hints.ts')
-rw-r--r-- | editors/code/src/inlay_hints.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts index 542d1f367..6a8bd942e 100644 --- a/editors/code/src/inlay_hints.ts +++ b/editors/code/src/inlay_hints.ts | |||
@@ -17,7 +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 | this.updater.syncCacheAndRenderHints(); | ||
22 | } else { | ||
23 | this.updater = new HintsUpdater(ctx); | ||
24 | } | ||
21 | }, | 25 | }, |
22 | dispose() { | 26 | dispose() { |
23 | this.updater?.dispose(); | 27 | this.updater?.dispose(); |
@@ -124,7 +128,7 @@ class HintsUpdater implements Disposable { | |||
124 | this.syncCacheAndRenderHints(); | 128 | this.syncCacheAndRenderHints(); |
125 | } | 129 | } |
126 | 130 | ||
127 | private syncCacheAndRenderHints() { | 131 | syncCacheAndRenderHints() { |
128 | // FIXME: make inlayHints request pass an array of files? | 132 | // FIXME: make inlayHints request pass an array of files? |
129 | this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => { | 133 | this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => { |
130 | if (!hints) return; | 134 | if (!hints) return; |