minor: explicitly set the focus to false

This commit is contained in:
Aleksey Kladov 2021-05-26 13:04:01 +03:00
parent b7414fa14a
commit 249e22b325

View 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;
}