From 1f12e558713604340a1339a9f996a01c331411f5 Mon Sep 17 00:00:00 2001 From: Andrew Craig Date: Fri, 5 Mar 2021 12:07:54 +0900 Subject: [PATCH 1/2] Add option to keep terminal hidden --- package.json | 3 ++- src/rTerminal.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ec7455247..0eddac49e 100644 --- a/package.json +++ b/package.json @@ -955,7 +955,8 @@ "default": "editor", "enum": [ "editor", - "terminal" + "terminal", + "none" ], "description": "Keeping focus when running." }, diff --git a/src/rTerminal.ts b/src/rTerminal.ts index 9c911122c..a8d850f69 100644 --- a/src/rTerminal.ts +++ b/src/rTerminal.ts @@ -265,5 +265,7 @@ export async function runTextInTerm(text: string): Promise { function setFocus(term: vscode.Terminal) { const focus: string = config().get('source.focus'); - term.show(focus !== 'terminal'); + if (focus !== 'none') { + term.show(focus !== 'terminal'); + } } From bf92991cbcf73fedd94d33a5d9ea8e305bb56121 Mon Sep 17 00:00:00 2001 From: Andrew Craig Date: Fri, 5 Mar 2021 12:08:21 +0900 Subject: [PATCH 2/2] Clarify r.source.focus options in description --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0eddac49e..425ce6be3 100644 --- a/package.json +++ b/package.json @@ -958,7 +958,7 @@ "terminal", "none" ], - "description": "Keeping focus when running." + "description": "What to show/focus after running code. Set to 'editor' or 'terminal' to show the terminal. Set to 'none' to not show the terminal." }, "r.alwaysUseActiveTerminal": { "type": "boolean",