From 0a1c8716040c3bd678864d32515dede7237a3200 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 11 Nov 2024 18:52:38 -0800 Subject: [PATCH] dont lose focus on editor when executing to native repl --- src/client/repl/replCommandHandler.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/repl/replCommandHandler.ts b/src/client/repl/replCommandHandler.ts index 0e4408d76bfb..13e7607b5cc8 100644 --- a/src/client/repl/replCommandHandler.ts +++ b/src/client/repl/replCommandHandler.ts @@ -31,7 +31,11 @@ export async function openInteractiveREPL( // Case where NotebookDocument doesnt exist, create a blank one. notebookDocument = await workspace.openNotebookDocument('jupyter-notebook'); } - const editor = window.showNotebookDocument(notebookDocument!, { viewColumn, asRepl: 'Python REPL' }); + const editor = window.showNotebookDocument(notebookDocument!, { + viewColumn, + asRepl: 'Python REPL', + preserveFocus: true, + }); await commands.executeCommand('notebook.selectKernel', { editor, id: notebookController.id,