From 249e22b3250a6e35d53064decb60b67b42a75f42 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 26 May 2021 13:04:01 +0300 Subject: [PATCH] minor: explicitly set the focus to false --- editors/code/src/run.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts index 138e3f6863..d0be840686 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; }