File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,7 @@ export class NativeRepl implements Disposable {
165165
166166 const notebookEditor = await openInteractiveREPL (
167167 this . replController ,
168- this . notebookDocument ,
169- wsMementoUri ,
168+ this . notebookDocument ?? wsMementoUri ,
170169 preserveFocus ,
171170 ) ;
172171 if ( notebookEditor ) {
Original file line number Diff line number Diff line change @@ -20,15 +20,13 @@ import { PVSC_EXTENSION_ID } from '../common/constants';
2020 */
2121export async function openInteractiveREPL (
2222 notebookController : NotebookController ,
23- notebookDocument : NotebookDocument | undefined ,
24- mementoValue : Uri | undefined ,
23+ notebookDocument : NotebookDocument | Uri | undefined ,
2524 preserveFocus : boolean = true ,
2625) : Promise < NotebookEditor | undefined > {
2726 let viewColumn = ViewColumn . Beside ;
28- if ( mementoValue ) {
29- if ( ! notebookDocument ) {
30- notebookDocument = await workspace . openNotebookDocument ( mementoValue as Uri ) ;
31- }
27+ if ( notebookDocument instanceof Uri ) {
28+ // Case where NotebookDocument is undefined, but workspace mementoURI exists.
29+ notebookDocument = await workspace . openNotebookDocument ( notebookDocument ) ;
3230 } else if ( notebookDocument ) {
3331 // Case where NotebookDocument (REPL document already exists in the tab)
3432 const existingReplViewColumn = getExistingReplViewColumn ( notebookDocument ) ;
You can’t perform that action at this time.
0 commit comments