zed icon indicating copy to clipboard operation
zed copied to clipboard

Window size & position are lost if I quit Zed in fullscreen

Open wzxu opened this issue 2 years ago • 20 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

When I quit Zed in normal windowed mode and re-launch it, it remembers the last size & position just as expected. However when I quit Zed in fullscreen mode, it indeed reopens in fullscreen mode, but the previous normal window size & position are lost.

Steps to reproduce:

  1. For easier observation, resize Zed to a smaller window and put it in the top right corner, or simply to a maximized size.
  2. Quit & reopen Zed, and observe the window appears in previous size & position, as expected.
  3. Go into fullscreen mode.
  4. Quit & reopen Zed, and observe the window appears first in a small size in the lower left corner and then animates to fullscreen, instead of animating from previous position & size.
  5. Go out of fullscreen mode, and observe the previous normal window state is lost and the window always defaults to a fixed size in the lower left corner.

I seem to remember this worked correctly before so I think it's a regression in recent versions? Not really sure, but I only noticed it recently.

Environment

Zed: v0.91.3 (stable) OS: macOS 13.4.0 Memory: 16 GiB Architecture: aarch64

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 issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

wzxu avatar Jun 26 '23 01:06 wzxu

I have a similar issue where opening a new Zed window always opens it in fullscreen regardless of the size of the last window. It's a minor annoyance, but happens a lot.

How to reproduce

cmd-shift-N (open a new window). It will open in fullscreen mode.

Environment

Zed: 0.98.2 OS: macOS 13.4.1 Memory: 8GB and 16GB Architecture: aarch64

Screenshot 2023-08-15 at 09 59 52

aesmail avatar Aug 15 '23 07:08 aesmail

Zed window always opens it in fullscreen if i open a file with mouse double click in MacOS(Ventura) Finder. It annoying me very much.

kleinstein avatar Sep 06 '23 07:09 kleinstein

Zed window always opens it in fullscreen if i open a file with mouse double click in MacOS(Ventura) Finder. It annoying me very much.

Good catch. I didn’t realize that opening from File > Open does indeed retain the previous window size. I wish this was the case on double-clicking.

fuzenco avatar Nov 17 '23 19:11 fuzenco

I too have this problem.

I have no projects or files open. I simply launch Zed from Dock and it always goes full screen width/height.

Zed never persist the window size or location after close. Even for blank/new files.

I'm running the latest preview (v0.119.16)

michealp-coder avatar Jan 24 '24 01:01 michealp-coder

Thanks for completing this. Fantastic work.

fuzenco avatar Jan 24 '24 18:01 fuzenco

Thanks for completing this. Fantastic work.

It was fixed?

brianm avatar Jan 25 '24 18:01 brianm

Thanks for completing this. Fantastic work.

It was fixed?

My bad. I’ve not tried full window mode. I see now that that’s what this Issue is about. At some point in the past few releases they must have fixed the app remembering window sizes which were NOT full screen.

fuzenco avatar Jan 25 '24 19:01 fuzenco

It's not fixed for me and I'm running the latest Preview release.

On Thu, Jan 25, 2024 at 1:17 PM Fuzen Co. @.***> wrote:

Thanks for completing this. Fantastic work.

It was fixed?

My bad. I’ve not tried full window mode. I see now that that’s what this Issue is about. At some point in the past few releases they must have fixed the app remembering window sizes which were full screen.

— Reply to this email directly, view it on GitHub https://github.com/zed-industries/zed/issues/4656#issuecomment-1910831475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUEN7J47BOF4PI5BRYXGIBTYQKVVHAVCNFSM6AAAAABCJFKRK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHAZTCNBXGU . You are receiving this because you commented.Message ID: @.***>

michealp-coder avatar Jan 28 '24 14:01 michealp-coder

It's not fixed for me and I'm running the latest Preview release. On Thu, Jan 25, 2024 at 1:17 PM Fuzen Co. @.> wrote: Thanks for completing this. Fantastic work. It was fixed? My bad. I’ve not tried full window mode. I see now that that’s what this Issue is about. At some point in the past few releases they must have fixed the app remembering window sizes which were full screen. — Reply to this email directly, view it on GitHub <#4656 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUEN7J47BOF4PI5BRYXGIBTYQKVVHAVCNFSM6AAAAABCJFKRK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHAZTCNBXGU . You are receiving this because you commented.Message ID: @.>

I updated my comment. The last sentence was supposed to be about non-full screen mode.

fuzenco avatar Jan 28 '24 21:01 fuzenco

It's not fixed for me and I'm running the latest Preview release. On Thu, Jan 25, 2024 at 1:17 PM Fuzen Co. @.> wrote: Thanks for completing this. Fantastic work. It was fixed? My bad. I’ve not tried full window mode. I see now that that’s what this Issue is about. At some point in the past few releases they must have fixed the app remembering window sizes which were full screen. — Reply to this email directly, view it on GitHub <#4656 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUEN7J47BOF4PI5BRYXGIBTYQKVVHAVCNFSM6AAAAABCJFKRK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHAZTCNBXGU . You are receiving this because you commented.Message ID: _@**.**_>

I updated my comment. The last sentence was supposed to be about non-full screen mode.

So this bug is or is not fixed for you?

It is not fixed for me.

Zed does not remember window size & position for any opened or new file.

Every time I launch Zed, it open a blank window at max width and height of my screen (which is not what I want).

I'm running Zed Preview 0.120.4

michealp-coder avatar Jan 29 '24 23:01 michealp-coder

First, note that I am running Zed Preview, not the most recent Stable release.

Here is what works for me…

If I have an open file…reduce the window size…and quit Zed…upon re-opening that file either by double-clicking the file on my desktop/Finder -or- using Finder > Open, Zed does remember the window size and position.

I don’t know your set-up, but that’s what works for me. Sorry I can’t be of further help.

fuzenco avatar Jan 29 '24 23:01 fuzenco

Also if you open from CLI zed <file> it is always full screen, hiding all of your other windows - super annoying. Can it not remember your previous preferred size or at least allow you to configure that in the settings. Also using zed always puts the file in a new window rather than a tab if you aleady have files open. You can't drag tabs from one window to another either so you're stuck with a new window.

azw413 avatar Jan 30 '24 12:01 azw413

First, note that I am running Zed Preview, not the most recent Stable release.

Here is what works for me…

If I have an open file…reduce the window size…and quit Zed…upon re-opening that file either by double-clicking the file on my desktop/Finder -or- using Finder > Open, Zed does remember the window size and position.

I don’t know your set-up, but that’s what works for me. Sorry I can’t be of further help.

Doesn't work for me (windows size/position doesn't get saved).

  • I launch Zed (from Dock)
  • FILE --> OPEN ("index.html")
  • I then resize the window/location as I'd like, then
  • By either closing the window (red "x" top left of window), or by completely shutting down Zed
  • When I then do FILE --> OPEN ("index.html") or even FILE --> NEW / NEW WINDOW

Zed launches the window full screen width/height (doesn't save my previous window size/location).

Note: I never go into "fullscreen" mode.

My setup is:

  • macOS 13.6.4
  • Zed Preview 0.120.4 (latest as of today)
  • Apple M1

michealp-coder avatar Jan 30 '24 17:01 michealp-coder

@JosephTLyons , can this bug be included in the https://github.com/zed-industries/zed/issues/6952 since it has 6 Thumbs Up (which would put it around midpoint on the Enhancement list, ranked by # of thumbs up)

michealp-coder avatar Jan 30 '24 20:01 michealp-coder

Just adding a "me too" to the pile - version Zed 0.119.21

nabeelio avatar Jan 30 '24 23:01 nabeelio

Zed 0.122.2 still opens with its window maximized and does not retain it's window size between sessions.

stiofanmacthomais avatar Feb 17 '24 09:02 stiofanmacthomais

to keep this issue active, 0.123.2 not fixed

pzmosquito avatar Feb 21 '24 23:02 pzmosquito

this issue is still active has not been fixed on latest preview.

Kuraviso avatar Feb 22 '24 21:02 Kuraviso

"default_width": 800 in ~/config/zed/settings.json works for me.

dborgex avatar Feb 28 '24 18:02 dborgex

"default_width": 800 in ~/config/zed/settings.json works for me.

Hmm. Not here. I'm running the latest Preview (0.124.6).

fuzenco avatar Feb 28 '24 18:02 fuzenco

This annoying problem persists on (0.125.3)

anunes avatar Mar 08 '24 09:03 anunes

Zed doesn't seem to remember the previous window size at all. In my case, I open Zed and the window is quite small so I maximize it, then quit Zen then reopen and the window is not maximized. Quite annoying

NicoAdrian avatar Apr 04 '24 19:04 NicoAdrian

@NicoAdrian

Same. This is being discussed here: https://github.com/zed-industries/zed/issues/5258#issuecomment-2012187539

michealp-coder avatar Apr 04 '24 20:04 michealp-coder

I think I have a related issue. Using mac (M2). Zed version 0.141.3

  1. Zed only visible in full screen, minimizing the app window hides it.
  2. When minimized I am unable to reopen it from dock
  3. Default_width does not work.

https://github.com/zed-industries/zed/assets/64744852/5b0ab481-b436-459d-87c1-2d69a455cbca

imbenrabi avatar Jul 01 '24 07:07 imbenrabi

@JosephTLyons will someone be assigned to this ticket given multiple people are experiencing this same bug?

Thanks in advance for all you do.

michealp-coder avatar Jul 02 '24 13:07 michealp-coder

@michealp-coder can you record a video of the bug reproduction? I can't reproduce it here.

I open Zed, I close, I reopen and window size is restored. Same goes for when I open Zed, resize, close, restart.

https://github.com/zed-industries/zed/assets/1185253/b2393152-de7c-4be8-87c9-b30fac9e5f4b

Do you have anything in the logs that seems relevant?

You can also move/backup the DB that Zed uses to persist window information and then start Zed and see if with fresh state it works:

// close zed, then:
mv ~/Library/Application\ Support/Zed/db/0-stable 0-stable-backup
// start zed

mrnugget avatar Jul 04 '24 12:07 mrnugget

@mrnugget

I’m running preview so I changed your command.

Many thanks in advance for creating Zed. It’s awesome and please starting charging for it so that I can support you all :)

See video

https://github.com/zed-industries/zed/assets/84467623/9b58c43c-60ac-44a6-a300-552c5bbcf5c9

michealp-coder avatar Jul 06 '24 22:07 michealp-coder

Yeah, seems like the same problem as in that other issue: we don't save the window size/position if you don't open a project.

mrnugget avatar Jul 08 '24 05:07 mrnugget

Yeah, seems like the same problem as in that other issue: we don't save the window size/position if you don't open a project.

@mrnugget is there any plans to save the window size/position for non-project files?

michealp-coder avatar Jul 08 '24 12:07 michealp-coder

We'll just have to get to it. Right now we're busy with other stuff that's also highly requested (such as the Linux port), but I hope we can get to work on a ticket like this inbetween. it's certainly on my radar.

mrnugget avatar Jul 08 '24 12:07 mrnugget