Skip to content

Commit f377620

Browse files
anthonykim1DonJayamanne
authored andcommitted
Bug Fix: REPL reuse and do not overwrite Jupyter's IW title (#23530)
Resolves: microsoft#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 025d1a6 commit f377620

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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)