-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Zed window should remember last window size and position when opening single files #5258
Comments
+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.) |
I don't think it is ridiculous, it is a pain to reset everything up every time. |
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. |
An option to "reopen where left off" (last project and files open from before last close) would also be lovely! |
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. |
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
|
Thanks for the behavioral explanation @chriskrycho! :D |
This should go out with v0.72.0. |
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! |
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. |
Bump, cc @JosephTLyons |
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. |
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) |
@mikayla-maki hello, any update on this matter ? :) |
any updates on this? (thanks again in advance for creating such a great product) |
Now a new file always opens in a small window in a center of the screen. And because of that it makes it very annoying to use Zed for quick file edits as every time when you open a new file you need to manually open it in a full-screen. |
any updates on this? (thanks again in advance for creating such a great product) |
Sorry to bug, but any updates on this? |
Any updates on this ticket? |
Just started to try Zed and this is the very first issue that I got. Any expectations on fix this? Using 0.169.3 here |
@mikayla-maki any updates on this
You mentioned 3-months ago you'd look into this more. Any updates? |
@JosephTLyons will someone be reassigned to this ticket given that @mikayla-maki indicated in the thread above 3-months ago that they would look into this bug but never followed up? |
why hasn't it been fixed yet? this is probably the most annoying issue in Zed |
be patient. also i actually like how it doesnt, so it my mind it should be an option |
Given that no one is any longer assigned to this issue, we're going to have to be very patient indeed. |
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
|
How to reproduce:
==> The window size is reset, i.e it doesn't remember the last window size. Resetting the DB did not help |
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? |
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 |
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. |
Any progress on this bug? |
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. |
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. |
@name-changer can you create a separate issue for that? |
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
The text was updated successfully, but these errors were encountered: