# Implement 'Cmd\+W with no open tabs closes the window', with a setting \(\#11989\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/11c97a396efedc61ad24e2a4019573283c86b40e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 11c97a396efedc61ad24e2a4019573283c86b40e

Requested commit: 11c97a396efedc61ad24e2a4019573283c86b40e

Commit: 11c97a396efedc61ad24e2a4019573283c86b40e

Tree: e235f6b2916fd575221c6e6fb3d79e771365568b

Author: Mikayla Maki

Committer: GitHub

## Message

```
Implement 'Cmd+W with no open tabs closes the window', with a setting (#11989)

Follow up to: https://github.com/zed-industries/zed/pull/10986

However, I have set this to have a default behavior of 'auto': matching
the current platform's conventions, rather than a default value of
'off'.

fixes https://github.com/zed-industries/zed/issues/5322.

Release Notes:

- Changed the behavior of `workspace::CloseActiveItem`: when you're
using macOS and there are no open tabs, it now closes the window
([#5322](https://github.com/zed-industries/zed/issues/5322)). This can
be controlled with a new setting, `when_closing_with_no_tabs`, to
disable it on macOS, or enable it on other platforms.
```

## Parents

- [7fd736e23c671f4d4e6e61dcd299e8aefaa833b2](https://git.cafe/gitcafe/zed/commit/7fd736e23c671f4d4e6e61dcd299e8aefaa833b2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/11c97a396efedc61ad24e2a4019573283c86b40e?format=markdown)
