You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When VS Code is already launched, open a file (from command line or Windows Explorer): file is added as an editor/tab in current workspace.
Launch VS Code by itself: All previously open files are restored.
Launch VS code by opening a file from command line or Windows Explorer: a fresh instance is created with only that file and any unsaved files; "clean" previous files/folders are not restored.
(3) is inconsistent with the expected behavior from both (1) and (2). It behaves almost as though window.openFilesInNewWindow is set to on when the application is closed, contra (1), and it ignores the expected behavior of the window.restoreWindows setting, contra (2).
It also gives privileged status to dirty files, which are always restored, for no sensible reason -- I can easily "dirty up" saved files by making a change and immediately undoing it, and it'll be restored when launching Code by opening a file. Why not just restore all files to begin with?
Code already has the -n command line parameter for opening files in a new window, yet this also only works when Code is already launched. Both -n and -r behave identically (i.e., is ignored) when it is used to launch VS Code from a file, creating another inconsistency between newly launched and existing instances of Code.
Finally, it's inconsistent with session restore behavior of Notepad++ and Sublime Text. Atom behaves like Code, but even they admit it's counter-intuitive.
Although #15949 is also open, I've created this separate issue because code . opens a new window even when VS Code is already launched. Hence the expected behavior already differs from (1) above.
The text was updated successfully, but these errors were encountered:
This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding!
Following up on comment thread at #207.
Relevant settings:
(3) is inconsistent with the expected behavior from both (1) and (2). It behaves almost as though
window.openFilesInNewWindow
is set to on when the application is closed, contra (1), and it ignores the expected behavior of thewindow.restoreWindows
setting, contra (2).It also gives privileged status to dirty files, which are always restored, for no sensible reason -- I can easily "dirty up" saved files by making a change and immediately undoing it, and it'll be restored when launching Code by opening a file. Why not just restore all files to begin with?
Code already has the
-n
command line parameter for opening files in a new window, yet this also only works when Code is already launched. Both-n
and-r
behave identically (i.e., is ignored) when it is used to launch VS Code from a file, creating another inconsistency between newly launched and existing instances of Code.Finally, it's inconsistent with session restore behavior of Notepad++ and Sublime Text. Atom behaves like Code, but even they admit it's counter-intuitive.
Although #15949 is also open, I've created this separate issue because
code .
opens a new window even when VS Code is already launched. Hence the expected behavior already differs from (1) above.The text was updated successfully, but these errors were encountered: