File tree 1 file changed +12
-14
lines changed 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -82,20 +82,18 @@ export async function registerReplCommands(
82
82
const activeEditor = window . activeTextEditor as TextEditor ;
83
83
const code = await getSelectedTextToExecute ( activeEditor ) ;
84
84
85
- if ( ! notebookEditor ) {
86
- const interactiveWindowObject = ( await commands . executeCommand (
87
- 'interactive.open' ,
88
- {
89
- preserveFocus : true ,
90
- viewColumn : ViewColumn . Beside ,
91
- } ,
92
- undefined ,
93
- notebookController . id ,
94
- 'Python REPL' ,
95
- ) ) as { notebookEditor : NotebookEditor } ;
96
- notebookEditor = interactiveWindowObject . notebookEditor ;
97
- notebookDocument = interactiveWindowObject . notebookEditor . notebook ;
98
- }
85
+ const interactiveWindowObject = ( await commands . executeCommand (
86
+ 'interactive.open' ,
87
+ {
88
+ preserveFocus : true ,
89
+ viewColumn : ViewColumn . Beside ,
90
+ } ,
91
+ undefined ,
92
+ notebookController . id ,
93
+ 'Python REPL' ,
94
+ ) ) as { notebookEditor : NotebookEditor } ;
95
+ notebookEditor = interactiveWindowObject . notebookEditor ;
96
+ notebookDocument = interactiveWindowObject . notebookEditor . notebook ;
99
97
100
98
if ( notebookDocument ) {
101
99
notebookController . updateNotebookAffinity ( notebookDocument , NotebookControllerAffinity . Default ) ;
You can’t perform that action at this time.
0 commit comments