Skip to content

Commit 6d88415

Browse files
authored
Bug Fix: REPL reuse and do not overwrite Jupyter's IW title (#23530)
Resolves: #23518 Should resolve issue where opening Python REPL -> opening Jupyter IW -> sending commands to REPL were happening instead of reusing existing Python REPL Also seems to resolve issue where Python REPL was overwriting to Jupyter's IW title. Switching to watch onDidCloseNotebook event as suggested.
1 parent f001597 commit 6d88415

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/client/repl/replCommands.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ function getSendToNativeREPLSetting(): boolean {
5454
return configuration.get<boolean>('REPL.sendToNativeREPL', false);
5555
}
5656

57-
window.onDidChangeVisibleTextEditors((editors) => {
58-
const interactiveWindowIsOpen = editors.some((editor) => editor.document.uri.scheme === 'vscode-interactive-input');
59-
if (!interactiveWindowIsOpen) {
57+
workspace.onDidCloseNotebookDocument((nb) => {
58+
if (notebookDocument && nb.uri.toString() === notebookDocument.uri.toString()) {
6059
notebookEditor = undefined;
6160
notebookDocument = undefined;
6261
}

0 commit comments

Comments
 (0)