Skip to content

Commit

Permalink
Keep focus on editor when executing to native REPL (microsoft#24420)
Browse files Browse the repository at this point in the history
Resolves: microsoft#23843
  • Loading branch information
anthonykim1 authored Nov 12, 2024
1 parent 542ff38 commit 7889127
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/repl/replCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7889127

Please sign in to comment.