Zed window should remember last window size and position when opening single files #24228
Replies: 66 comments
-
Blocks on: https://github.com/zed-industries/feedback/issues/430 |
Beta Was this translation helpful? Give feedback.
-
+1 — this is going to sound ridiculous, but it's a blocker for adaptation for me as I open a lot of temporary windows in my workflow (currently using Sublime.) |
Beta Was this translation helpful? Give feedback.
-
I don't think it is ridiculous, it is a pain to reset everything up every time. |
Beta Was this translation helpful? Give feedback.
-
This and a "recent" file menu (#77) is adding unnecessary friction to getting started with my work. Hard to measure the pain threshold, but its in the back of my mind every time I open Zed. |
Beta Was this translation helpful? Give feedback.
-
An option to "reopen where left off" (last project and files open from before last close) would also be lovely! |
Beta Was this translation helpful? Give feedback.
-
This was the first thing I noticed when I launched the app. I'm glad to see other people care. The mention of serializable workspaces (#430) makes me worry about it being tied to saving a workspace. I basically only care about the default new window size which I would think would be tied to a new (unsaved) workspace. |
Beta Was this translation helpful? Give feedback.
-
I just came here to say the exact same thing as @emlynmu – this should be separate behavior from serializing workspaces. On macOS, whenever you open a new window of an existing (well-behaved) application, it matches the size of the most recent1 window. It should also open in a new position, offset down-and-to-the-right (with "wrapping" that respects positions of existing windows) behavior. Here's how it looks with VS Code (it took them years to get to it, but they finally did 😂): CleanShot.2022-11-17.at.10.06.38-converted.mp4Footnotes
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the behavioral explanation @chriskrycho! :D |
Beta Was this translation helpful? Give feedback.
-
This should go out with v0.72.0. |
Beta Was this translation helpful? Give feedback.
-
I regret to say: This is not quite fixed in 0.72.x, though it took a big step forward: It is fixed when saving workspaces, and appears to remember the position used for a specific folder, but the feature request here is for a muuuuuch more general feature! See e.g. my example above—and note as well that you can trivially reproduce this by just opening any folder and then opening any new window! |
Beta Was this translation helpful? Give feedback.
-
If I close Zed while fullscreen it still won't start in fullscreen mode. It would improve consistency if it would remember the mode across restarts. |
Beta Was this translation helpful? Give feedback.
-
Bump, cc @JosephTLyons |
Beta Was this translation helpful? Give feedback.
-
I think it would be ideal if the new editor window had the dimensions of the recently opened project window. Don't like it when a 'clean' window takes up the entire desktop. |
Beta Was this translation helpful? Give feedback.
-
This is a problem for me as well (running v0.119.16), and super annoying as well. I don't have any projects open. When I launch Zed, it's to an empty/blank new file window. I'll adjust the size and location of the new file window, to my liking. I then close Zed. When I reopen Zed, the window doesn't have the previous size/location of the window and instead reverts to being max width/height of screen. CC: @mikayla-maki @JosephTLyons (Thanks for all the great work on Zed) |
Beta Was this translation helpful? Give feedback.
-
+1, it's crucial. I'm using 32:9 ultra wide monitor + Rectangle for resizing my windows. I know probably using such monitor isn't good for coding, but usually I place all my windows in the center of the screen, and it's fine for me. When I want to quickly edit some files (e.g. "Open With... -> Zed.app"), every time the editor opens full screen and I need to manually adjust the size of the window. What's interesting, is that the editor does remember the last position, but particularly for a single file, and it's not possible to remember window size and position for other files that were not open yet. My Jetbains products and vs code does remember size/position, but zed does not, which is huge blocker. |
Beta Was this translation helpful? Give feedback.
-
Given that no one is any longer assigned to this issue, we're going to have to be very patient indeed. |
Beta Was this translation helpful? Give feedback.
-
It's hard to reproduce and also works for a lot of people. I also think there's a lot of different things being lumped together subconsciously:
The video you provided @michealp-coder was already very helpful. One ask for everybody in this ticket:
In order to test (2) you can do the following: # 1. Close Zed
# 2. Move `0-stable` database (or `0-preview` if you run Preview) to home dir
mv ~/Library/Application\ Support/Zed/db/0-stable ~/0-stable-backup
# 3. Start Zed
# ... reproduce bug etc. etc.
# 4. Quit Zed
# To restore DB, do the reverse:
mv ~/0-stable-backup ~/Library/Application\ Support/Zed/db/0-stable
|
Beta Was this translation helpful? Give feedback.
-
How to reproduce:
==> The window size is reset, i.e it doesn't remember the last window size. Resetting the DB did not help |
Beta Was this translation helpful? Give feedback.
-
That works for me: screenshot-2024-07-04-15.36.54.mp4Now the question is: what's different between what you do and what I do? When you open Zed, for example, does it open a recent project? |
Beta Was this translation helpful? Give feedback.
-
Ok I managed to make Zed remember the last window size. The issue is that I had no project openned ever: So this is the bug: when no project is openned, Zed can't remember last window size. (Also another annoying bug is that when I right click on the folder name and then click on "remove from project", If I quit Zed et re-open it again, the project is openned again even though I removed it) edit: If you want to reproduce, the only way I found to remove recently openned project is to uninstall Zed et reinstall |
Beta Was this translation helpful? Give feedback.
-
I think what's different is you're opening into an existing Project. We are not. We don't have a project open. We're just opening individual files to edit them. |
Beta Was this translation helpful? Give feedback.
-
Any progress on this bug? |
Beta Was this translation helpful? Give feedback.
-
In some sense, yes. I did work a lot on the restoring of workspaces/windows in the past few weeks:
But I didn't get to this one yet. It's highly-related to this #15098 but it's really tricky, because in Zed a window without any workspace (i.e. a window that was created when opening a single file) is essentially identity-less and we need to change the system so that's not the case. I did have half a version of this working, but there's a ton of edge cases to pay attention to and so I went and worked on the other things first. |
Beta Was this translation helpful? Give feedback.
-
I see a (probably related) bug on current Wayland/KDE (the distro is OpenSuse Tumbleweed): when Zed (0.152.3) is not maximized, and I close and open the application, the window 'grows' bigger by a few pixel (maybe 20-30 or so, so it's quite noticeable). After closing and opening a few times, I can't see the statusbar at the bottom anymore, because the window grows bigger than my current resolution. Since I typically only maximize my editor windows vertically, but not horizontally, this is a bit annoying, since I now have to periodically resize the way too large window. |
Beta Was this translation helpful? Give feedback.
-
@name-changer can you create a separate issue for that? |
Beta Was this translation helpful? Give feedback.
-
any news on this? |
Beta Was this translation helpful? Give feedback.
-
It's frustrating yes :( |
Beta Was this translation helpful? Give feedback.
-
This is one of our oldest issues but definitely worth tracking. We've decided to move feature/enhancement requests to discussions so I'm going to move this there in the hopes it gets more visibility and stays on our radar better |
Beta Was this translation helpful? Give feedback.
-
Zed should also remember desktops. I use several separate Zed windows/workspace for every project, and each of them are on their own macOS workspaces/desktops. When restarting Zed (for updates of Zed itself, and when macOS starts to rot or wants to be updated), all the windows appear on a single desktop, and need to be manually moved to the appropriate ones. It would reduce reboot annoyance significantly if Zed—as the only app besides VSCode that I use(d) that doesn't do so—would remember the desktop of each window, and reopen it on that one. There even seems to be a related bug: 'reload workspace' also moves all the windows to the same desktop. It seem that it's not reloading a single workspace, but all of them. |
Beta Was this translation helpful? Give feedback.
-
Check for existing issues
Describe the bug
When opening Zed it should remember previous window size and position when Zed was closed.
To reproduce
Expected behavior
Expected: previous window size/position is honored.
Now: Using same size and location at startup.
Environment
Zed 0.49.1 – /Applications/Zed.app \nmacOS 12.5 \narchitecture x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issueNo response
Beta Was this translation helpful? Give feedback.
All reactions