zed icon indicating copy to clipboard operation
zed copied to clipboard

Changed cmd+w with no open tabs to close window

Open williamviktorsson opened this issue 1 year ago • 7 comments

Fixes https://github.com/zed-industries/zed/issues/5322

Release Notes:

  • Changed cmd+w with no open tabs to close window #5322

https://github.com/zed-industries/zed/assets/22855292/113b1635-ae30-4718-a3d3-758a4bf53714

williamviktorsson avatar Apr 18 '24 20:04 williamviktorsson

We require contributors to sign our Contributor License Agreement, and we don't have @williamviktorsson on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot[bot] avatar Apr 18 '24 20:04 cla-bot[bot]

@cla-bot check

williamviktorsson avatar Apr 18 '24 20:04 williamviktorsson

We require contributors to sign our Contributor License Agreement, and we don't have @williamviktorsson on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot[bot] avatar Apr 18 '24 20:04 cla-bot[bot]

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Apr 18 '24 20:04 cla-bot[bot]

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Apr 18 '24 20:04 cla-bot[bot]

Two thoughts:

  • While this fixes the issue, and is similar to default behaviour of other apps, one might want to be able to configure the behaviour.

  • I noticed that if you cmd+w with focus on terminals, it closes terminals first, then editor windows, then application window. However, if you focus editor windows and start cmd+w, it will close the editors then the application window, and focus does not go to terminals first. This is consistent with how VSCode does it, just thought I'd mention it cause I was expecting terminals to count as active windows.

williamviktorsson avatar Apr 19 '24 04:04 williamviktorsson

I really would also like to know how if it would be possible to return to the previous project after closing the window with "CloseWindow", in the same way you return to the previous project after closing with "Quit" ?

williamviktorsson avatar Apr 19 '24 04:04 williamviktorsson

Thank you!

mikayla-maki avatar Apr 19 '24 21:04 mikayla-maki

I really would also like to know how if it would be possible to return to the previous project after closing the window with "CloseWindow", in the same way you return to the previous project after closing with "Quit" ?

I don't think there would be a way. We save the orientation of your tabs every time you open or close one.

mikayla-maki avatar Apr 19 '24 21:04 mikayla-maki

I really would also like to know how if it would be possible to return to the previous project after closing the window with "CloseWindow", in the same way you return to the previous project after closing with "Quit" ?

I don't think there would be a way. We save the orientation of your tabs every time you open or close one.

I feel like this is a good feature and I'll make an issue out of it explaining why, along with a PR to fix it.

williamviktorsson avatar Apr 20 '24 18:04 williamviktorsson

Darn, this got reverted. @williamviktorsson , are you interested in working on a modified version of this feature (i.e. with a setting defaulted to false as noted in #10986)?

baldwindavid avatar May 09 '24 14:05 baldwindavid

Darn, this got reverted. @williamviktorsson , are you interested in working on a modified version of this feature (i.e. with a setting defaulted to false as noted in #10986)?

I could but I’m occupied for a few weeks. The changes in my reverted pr is one line of code so it should be easy to include and wrap in a setting check :-)

williamviktorsson avatar May 09 '24 18:05 williamviktorsson