diff options
Diffstat (limited to 'editors/code/src/commands/watch_status.ts')
-rw-r--r-- | editors/code/src/commands/watch_status.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/editors/code/src/commands/watch_status.ts b/editors/code/src/commands/watch_status.ts index a3b0178f2..6c1f9041b 100644 --- a/editors/code/src/commands/watch_status.ts +++ b/editors/code/src/commands/watch_status.ts | |||
@@ -7,13 +7,15 @@ export class StatusDisplay implements vscode.Disposable { | |||
7 | 7 | ||
8 | private i = 0; | 8 | private i = 0; |
9 | private statusBarItem: vscode.StatusBarItem; | 9 | private statusBarItem: vscode.StatusBarItem; |
10 | private command: string; | ||
10 | private timer?: NodeJS.Timeout; | 11 | private timer?: NodeJS.Timeout; |
11 | 12 | ||
12 | constructor() { | 13 | constructor(command: string) { |
13 | this.statusBarItem = vscode.window.createStatusBarItem( | 14 | this.statusBarItem = vscode.window.createStatusBarItem( |
14 | vscode.StatusBarAlignment.Left, | 15 | vscode.StatusBarAlignment.Left, |
15 | 10 | 16 | 10 |
16 | ); | 17 | ); |
18 | this.command = command; | ||
17 | this.statusBarItem.hide(); | 19 | this.statusBarItem.hide(); |
18 | } | 20 | } |
19 | 21 | ||
@@ -24,11 +26,13 @@ export class StatusDisplay implements vscode.Disposable { | |||
24 | this.timer || | 26 | this.timer || |
25 | setInterval(() => { | 27 | setInterval(() => { |
26 | if (this.packageName) { | 28 | if (this.packageName) { |
27 | this.statusBarItem!.text = `cargo check [${ | 29 | this.statusBarItem!.text = `cargo ${this.command} [${ |
28 | this.packageName | 30 | this.packageName |
29 | }] ${this.frame()}`; | 31 | }] ${this.frame()}`; |
30 | } else { | 32 | } else { |
31 | this.statusBarItem!.text = `cargo check ${this.frame()}`; | 33 | this.statusBarItem!.text = `cargo ${ |
34 | this.command | ||
35 | } ${this.frame()}`; | ||
32 | } | 36 | } |
33 | }, 300); | 37 | }, 300); |
34 | 38 | ||