about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-26 10:04:37 +0000
committerGitHub <noreply@github.com>2021-05-26 10:04:37 +0000
commit8c80a217722484f23b28a58dcdf91b051fac375a (patch)
tree7bf29e053f9597de65daf152fbbac9cd467940c8 /editors/code/src
parent8483fb0f269c819cf0970c25cf81660622f1d763 (diff)
parent249e22b3250a6e35d53064decb60b67b42a75f42 (diff)
downloadrust-8c80a217722484f23b28a58dcdf91b051fac375a.tar.gz
rust-8c80a217722484f23b28a58dcdf91b051fac375a.zip
Merge #9001
9001: minor: explicitly set the focus to false r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/run.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts
index 138e3f6863a..d0be8406869 100644
--- a/editors/code/src/run.ts
+++ b/editors/code/src/run.ts
@@ -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;
 }