Skip to content

Commit 03a78bd

Browse files
committed
Fix mpy project folder opening in same window issue
Signed-off-by: paulober <[email protected]>
1 parent d937fb6 commit 03a78bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/webview/newMicroPythonProjectPanel.mts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,11 @@ print("Finished.")\r\n`;
354354
await new Promise(resolve => setTimeout(resolve, 2000));
355355

356356
// open and call initialise
357-
commands.executeCommand("vscode.openFolder", Uri.file(projectFolder), {
358-
forceReuseWindow: true,
359-
});
357+
void commands.executeCommand(
358+
"vscode.openFolder",
359+
Uri.file(projectFolder),
360+
(workspace.workspaceFolders?.length ?? 0) > 0
361+
);
360362
}
361363

362364
private async _update(): Promise<void> {

0 commit comments

Comments
 (0)