From 0f967b67f51d0a1c2a06dc7fb84f6f33bc0e0c1f Mon Sep 17 00:00:00 2001 From: meganrogge Date: Wed, 15 Nov 2023 15:22:16 -0800 Subject: [PATCH 1/2] fix #197394 --- .vscode/tasks.json | 12 ++++++++++++ .../contrib/tasks/browser/terminalTaskSystem.ts | 3 +++ 2 files changed, 15 insertions(+) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 666edb3fb2c..8fd8d27c0b4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -28,6 +28,18 @@ "endsPattern": "Finished compilation with" } } + }, + { + "label": "go mod tidy", + "type": "shell", + "command": "echo hi", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new", + "focus": true, + "echo": true + }, }, { "type": "npm", diff --git a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts index 10417447bf8..06bd2e896d2 100644 --- a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts +++ b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts @@ -1040,6 +1040,9 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem { } else if (task.command.presentation && (task.command.presentation.focus || task.command.presentation.reveal === RevealKind.Always)) { this._terminalService.setActiveInstance(terminal); await this._terminalService.revealActiveTerminal(); + if (task.command.presentation.focus) { + this._terminalService.focusActiveInstance(); + } } this._activeTasks[task.getMapKey()].terminal = terminal; this._fireTaskEvent(TaskEvent.changed()); From 4d30cfe24503c715d30b7492f75c44670f4528e4 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Wed, 15 Nov 2023 15:23:32 -0800 Subject: [PATCH 2/2] Update .vscode/tasks.json --- .vscode/tasks.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 8fd8d27c0b4..666edb3fb2c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -28,18 +28,6 @@ "endsPattern": "Finished compilation with" } } - }, - { - "label": "go mod tidy", - "type": "shell", - "command": "echo hi", - "group": "build", - "presentation": { - "reveal": "always", - "panel": "new", - "focus": true, - "echo": true - }, }, { "type": "npm",