# pane: Improve close active item to better handle pinned tabs \(\#23488\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 44c6a54f95628381ede4a7299247342a48617870

Requested commit: 44c6a54f95628381ede4a7299247342a48617870

Commit: 44c6a54f95628381ede4a7299247342a48617870

Tree: 354a850fca4a5349de22ee0c792138c01a7494a7

Author: smit

Committer: GitHub

## Message

```
pane: Improve close active item to better handle pinned tabs (#23488)

Closes #22247

- [x] Do not close pinned tab on keyboard shortcuts like `ctrl+w` or
`alt+f4`
- [x] Close pinned tab on context menu action, menu bar action, or vim
bang
- [x] While closing pinned tab via shortcut (where it won't close),
instead activate any other non-pinned tab in same pane
- [x] Else, if any other pane contains non-pinned tab, activate that
- [x] Tests

Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com>

Release Notes:

- Pinned tab now stay open when using close shortcuts, auto focuses to
any other non-pinned tab instead.
```

## Parents

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

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