Skip to content

Commit

Permalink
Fix mpy project folder opening in same window issue
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 17, 2024
1 parent d937fb6 commit 03a78bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/webview/newMicroPythonProjectPanel.mts
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,11 @@ print("Finished.")\r\n`;
await new Promise(resolve => setTimeout(resolve, 2000));

// open and call initialise
commands.executeCommand("vscode.openFolder", Uri.file(projectFolder), {
forceReuseWindow: true,
});
void commands.executeCommand(
"vscode.openFolder",
Uri.file(projectFolder),
(workspace.workspaceFolders?.length ?? 0) > 0
);
}

private async _update(): Promise<void> {
Expand Down

0 comments on commit 03a78bd

Please sign in to comment.