diff options
Diffstat (limited to 'editors/code/src/status_display.ts')
-rw-r--r-- | editors/code/src/status_display.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts index 326b5217b..ed0d82166 100644 --- a/editors/code/src/status_display.ts +++ b/editors/code/src/status_display.ts | |||
@@ -9,11 +9,14 @@ const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', ' | |||
9 | export function activateStatusDisplay(ctx: Ctx) { | 9 | export function activateStatusDisplay(ctx: Ctx) { |
10 | const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command); | 10 | const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command); |
11 | ctx.pushCleanup(statusDisplay); | 11 | ctx.pushCleanup(statusDisplay); |
12 | ctx.onStart(client => ctx.pushCleanup(client.onProgress( | 12 | const client = ctx.client; |
13 | WorkDoneProgress.type, | 13 | if (client != null) { |
14 | 'rustAnalyzer/cargoWatcher', | 14 | ctx.pushCleanup(client.onProgress( |
15 | params => statusDisplay.handleProgressNotification(params) | 15 | WorkDoneProgress.type, |
16 | ))); | 16 | 'rustAnalyzer/cargoWatcher', |
17 | params => statusDisplay.handleProgressNotification(params) | ||
18 | )) | ||
19 | } | ||
17 | } | 20 | } |
18 | 21 | ||
19 | class StatusDisplay implements Disposable { | 22 | class StatusDisplay implements Disposable { |