zed
zed copied to clipboard
Last manually-closed workspace reopens on Zed startup
Summary (quoting @notpeter): If you close the workspace (cmd+w) before quitting (cmd+q) when you come back, Zed reopens that workspace instead of giving you a blank window. This behavior differs what other editors do and thus what some users will expect.
Describe the bug / provide steps to reproduce it
I have downloaded zed and opened a folder as a project. When I close the project I habe zed in the state that I want it in on startup. However whenever I start up zed it opens the closed project again.
I can not close the project and have it stay closed. It always reopens on its own.
Are you looking for something different than setting "restore_on_startup": "none" in your settings.json?
Yes, I think I do. When I actively remove any open projects from zed before closing, I expect it to open "empty" as I left it. But it does'nt. It will restore to the last project I had opened instead of the bare, empty state. I do want to it to reopen to a project if I left it open. But I also want it to restore to empty if I consciously do so before closing.
Are you looking for something different than setting
"restore_on_startup": "none"in your settings.json?
I tried using this as a work around - even though it's not what I want - and noticed something interesting (probably another issue). The setting works when launching from the macOS GUI, Spotlight or Alfred.app. The setting does not do anything at all when launching from the CLI. It launches a second window that will also reopen the last opened project. Opening the settings there will show that "restore_on_startup": "none" is correctly set however.
Are you looking for something different than setting
"restore_on_startup": "none"in your settings.json?I tried using this as a work around - even though it's not what I want - and noticed something interesting (probably another issue). The setting works when launching from the macOS GUI, Spotlight or Alfred.app. The setting does not do anything at all when launching from the CLI. It launches a second window that will also reopen the last opened project. Opening the settings there will show that
"restore_on_startup": "none"is correctly set however.
This is actually a different issue:
- #9592
I take it you want Zed to open with an empty project, should you have exited the application in the below displayed state?
I can duplicate this with current releases. If you close the workspace (cmd+w) before quitting (cmd+q) when you come back, Zed reopens that workspace instead of giving you a blank window. This behavior differs what other editors do and thus what some users will expect.
~On Linux, "restore_on_startup": "none" setting does not work. The editor still opens the folder from the last session.~
In version 0.146.3 the setting works properly.
Was having the same issue here. Tried "restore_on_startup": "none" in settings.json and it did prevent previously worked on projects from opening. But the issue isn't entirely fixed because when opening up a project using the cli you should expect the project to be the only one that opens, however now I am getting the project I wanted opened as well as a blank project.