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

"File > Open Recent" closes all open editor windows before opening the recent file #35655

Closed
peterdarthur opened this issue Oct 5, 2017 · 7 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@peterdarthur
Copy link

  • VSCode Version: Code 1.16.1 (27492b6, 2017-09-14T16:24:39.530Z)
  • OS Version: Darwin x64 17.0.0
  • Extensions: none

Multiple editor windows are supported in VSCode, although it is not as intuitive as Sublime or other editors to achieve this:

  • can't drag a tab out into a new window
  • can't right-click a file in the explorer to open in a new window
  • can't right-click an open tab to open in a new window
  • the only way I'm aware of opening a file in a new window is File > New Window, which requires browsing for the file instead of using the other methods listed.

But in this case, it seems like VSCode explicitly wants to prevent multi-window editing. Try this for yourself:

Steps to Reproduce:

  1. Open file_A.
  2. File > Open Recent > /path/to/file_B
  3. Notice that file_A is not open anymore.

Is it just me?

@isidorn
Copy link
Contributor

isidorn commented Oct 6, 2017

There are already issues open regarding this including
Closing as duplicate #396 and there are also other issues that cover this
fyi @bpasero

@isidorn isidorn closed this as completed Oct 6, 2017
@isidorn isidorn added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 6, 2017
@mit-mit
Copy link

mit-mit commented Oct 12, 2017

@isidorn this was closed as a duplicate of #396, but it I read that issue correctly it covers the ability to have multiple project folders in a single editor window.

What I thought the present bug covers is better support for multiple editor windows. cc @peterdarthur to see if he had the same in mind?

Specifically, as the title suggest, there is a very annoying issue that if you are in an editor window with some folder opened, and you then use File > Open Recent to open another folder, then vscode force-closes the current editor window before opening a new one.

@isidorn
Copy link
Contributor

isidorn commented Oct 12, 2017

fyi @bpasero

@peterdarthur
Copy link
Author

This is very different from #396. I don't need multiple project folders open at once in one window, but what I would like (concerning the original complaint) is either:

A. Warning dialog that prompts me with "Are you sure you would like to open X recent file? Proceeding will close all currently open files and projects" [Cancel] [OK]

or
B. Integrate the recent file(s) into the currently open window.

or
C. (Best case) If recent file belongs to the open project folder, open it in the already-open window. Else if it's from a different project, open it in a new window WITHOUT CLOSING ANY OTHER WINDOWS.

Currently, as mentioned in the original post, opening a recent file force-closes open windows. I haven't found any other threads that mention "Open Recent" in this way. This bug closes files without warning and should be addressed. Is it possible to reopen this issue, @isidorn ?

@mit-mit
Copy link

mit-mit commented Oct 12, 2017

I would also prefer something like option C.

@bpasero
Copy link
Member

bpasero commented Oct 13, 2017

We never close any window when you pick a file from the File > Open Recent list. You are talking about opening folders right? Anyway, you workaround this by setting "window.openFoldersInNewWindow": "on" or by Alt+clicking the entry in the list to force open in new window.

@Rylon
Copy link

Rylon commented Oct 23, 2017

@bpasero I'm encountering this issue myself actually, running on macOS - if I choose a project from "Open Recent", the currently open window is replaced entirely with the other project, even if I have "window.openFoldersInNewWindow": "on" in my settings.

Option+Clicking the entry forces it to open in a new windows as expected, but I'd like to make that the default somehow. Do you have any ideas as to what might be causing that?

EDIT: I found the cause - my own stupidity 😆 - I had actually set openFilesInNewWindow, not openFoldersInNewWindow. Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants