aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/config.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index ec2790b63..fc21c8813 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -42,6 +42,7 @@ export class Config {
42 42
43 private prevEnhancedTyping: null | boolean = null; 43 private prevEnhancedTyping: null | boolean = null;
44 private prevCargoFeatures: null | CargoFeatures = null; 44 private prevCargoFeatures: null | CargoFeatures = null;
45 private prevCargoWatchOptions: null | CargoWatchOptions = null;
45 46
46 constructor(ctx: vscode.ExtensionContext) { 47 constructor(ctx: vscode.ExtensionContext) {
47 vscode.workspace.onDidChangeConfiguration(_ => this.refresh(), ctx.subscriptions); 48 vscode.workspace.onDidChangeConfiguration(_ => this.refresh(), ctx.subscriptions);
@@ -174,6 +175,21 @@ export class Config {
174 } 175 }
175 this.prevCargoFeatures = { ...this.cargoFeatures }; 176 this.prevCargoFeatures = { ...this.cargoFeatures };
176 177
178 if (this.prevCargoWatchOptions !== null) {
179 const changed =
180 this.cargoWatchOptions.enable !== this.prevCargoWatchOptions.enable ||
181 this.cargoWatchOptions.command !== this.prevCargoWatchOptions.command ||
182 this.cargoWatchOptions.allTargets !== this.prevCargoWatchOptions.allTargets ||
183 this.cargoWatchOptions.arguments.length !== this.prevCargoWatchOptions.arguments.length ||
184 this.cargoWatchOptions.arguments.some(
185 (v, i) => v !== this.prevCargoWatchOptions!.arguments[i],
186 );
187 if (changed) {
188 requireReloadMessage = 'Changing cargo-watch options requires a reload';
189 }
190 }
191 this.prevCargoWatchOptions = { ...this.cargoWatchOptions };
192
177 if (requireReloadMessage !== null) { 193 if (requireReloadMessage !== null) {
178 const reloadAction = 'Reload now'; 194 const reloadAction = 'Reload now';
179 vscode.window 195 vscode.window