]> git.lizzy.rs Git - rust.git/commitdiff
minor: explicitly set the focus to false
authorAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 26 May 2021 10:04:01 +0000 (13:04 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 26 May 2021 10:04:01 +0000 (13:04 +0300)
editors/code/src/run.ts

index 138e3f6863a3a2801b616ed5c1e84f5c20bfc627..d0be840686917ea907973f22775e3097347e03b7 100644 (file)
@@ -142,7 +142,11 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
     // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
     const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate()
     const cargoTask = await tasks.buildCargoTask(target, definition, runnable.label, args, config.cargoRunner, true);
+
     cargoTask.presentationOptions.clear = true;
+    // Sadly, this doesn't prevent focus stealing if the terminal is currently
+    // hidden, and will become revealed due to task exucution.
+    cargoTask.presentationOptions.focus = false;
 
     return cargoTask;
 }