Skip to content

Commit 7889127

Browse files
authored
Keep focus on editor when executing to native REPL (#24420)
Resolves: #23843
1 parent 542ff38 commit 7889127

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/client/repl/replCommandHandler.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ export async function openInteractiveREPL(
3131
// Case where NotebookDocument doesnt exist, create a blank one.
3232
notebookDocument = await workspace.openNotebookDocument('jupyter-notebook');
3333
}
34-
const editor = window.showNotebookDocument(notebookDocument!, { viewColumn, asRepl: 'Python REPL' });
34+
const editor = window.showNotebookDocument(notebookDocument!, {
35+
viewColumn,
36+
asRepl: 'Python REPL',
37+
preserveFocus: true,
38+
});
3539
await commands.executeCommand('notebook.selectKernel', {
3640
editor,
3741
id: notebookController.id,

0 commit comments

Comments
 (0)