Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow window.restoreWindows setting when launching Code by opening a file #34529

Closed
aethelberht opened this issue Sep 17, 2017 · 1 comment
Closed
Labels
feature-request Request for new features or functionality

Comments

@aethelberht
Copy link

aethelberht commented Sep 17, 2017

Following up on comment thread at #207.

  • VSCode Version: 1.16.1
  • OS Version: Windows 10.0.15063

Relevant settings:

"window.restoreWindows": "all",
"window.openFilesInNewWindow": "off",
"files.hotExit": "onExit"
  1. 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.
  2. Launch VS Code by itself: All previously open files are restored.
  3. 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.

@bpasero bpasero added the feature-request Request for new features or functionality label Sep 18, 2017
@bpasero bpasero removed their assignment Sep 18, 2017
@bpasero
Copy link
Member

bpasero commented Nov 16, 2017

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!

@bpasero bpasero closed this as completed Nov 16, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants