vscode.openFolder
command does not reuse window even using forceReuseWindow
or forceNewWindow
options
#231702
Labels
info-needed
Issue requires more information from poster
Does this issue occur when all extensions are disabled?: Yes
It is not possible to open a folder with the built-in command
vscode.openFolder
and reuse the window. Even if there isn't anything open in the window (just one, totally empty, no folders/workspaces/editors/welcome), it closes the current window and creates a new one.The
vscode.openFolder
built-in command documentation states that an options object could be supplied with the following options:Developing an simple extension and using any of the below statements ends up closing the window and opening a new one:
The implication of this window re-creation is that all extensions are reloaded.
Here is a short demo:
vscode-open-not-reuse-window.mp4
This happens even with for example the Git integration internal extension as shown in the below "Step to Reproduce".
Steps to Reproduce:
Open
(in the same window),Open in New Window
orCancel
... SelectOpen
This is the code that handles this behavior on the Git extension:
vscode/extensions/git/src/commands.ts
Lines 899 to 905 in 759c92b
By the way, as part of the analysis I found out some undocumented options for
vscode.openFolder
:vscode/src/vs/workbench/browser/actions/workspaceCommands.ts
Lines 156 to 221 in 759c92b
The text was updated successfully, but these errors were encountered: