aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/watch_status.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands/watch_status.ts')
-rw-r--r--editors/code/src/commands/watch_status.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/editors/code/src/commands/watch_status.ts b/editors/code/src/commands/watch_status.ts
index f027d7bbc..86ae821de 100644
--- a/editors/code/src/commands/watch_status.ts
+++ b/editors/code/src/commands/watch_status.ts
@@ -3,6 +3,8 @@ import * as vscode from 'vscode';
3const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']; 3const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
4 4
5export class StatusDisplay { 5export class StatusDisplay {
6 public packageName?: string;
7
6 private i = 0; 8 private i = 0;
7 private statusBarItem: vscode.StatusBarItem; 9 private statusBarItem: vscode.StatusBarItem;
8 private timer?: NodeJS.Timeout; 10 private timer?: NodeJS.Timeout;
@@ -17,10 +19,18 @@ export class StatusDisplay {
17 } 19 }
18 20
19 public show() { 21 public show() {
22 this.packageName = undefined;
23
20 this.timer = 24 this.timer =
21 this.timer || 25 this.timer ||
22 setInterval(() => { 26 setInterval(() => {
23 this.statusBarItem!.text = 'cargo check ' + this.frame(); 27 if (this.packageName) {
28 this.statusBarItem!.text = `cargo check [${
29 this.packageName
30 }] ${this.frame()}`;
31 } else {
32 this.statusBarItem!.text = `cargo check ${this.frame()}`;
33 }
24 }, 300); 34 }, 300);
25 35
26 this.statusBarItem!.show(); 36 this.statusBarItem!.show();