# tab_switcher: Preserve selected position on closed tabs \(\#22861\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 571275e6c419da5cf17477b9b164d07880636610

Requested commit: 571275e6c419da5cf17477b9b164d07880636610

Commit: 571275e6c419da5cf17477b9b164d07880636610

Tree: f1a9bc0f0a9dd52d338deee808b11873ca53d61c

Author: Andrew Borg \(Kashin\)

Committer: GitHub

## Message

```
tab_switcher: Preserve selected position on closed tabs (#22861)

When the user closes a tab, the tab switcher will now select the tab at
the same position. This feature is especially relevant for keyboard
users when you want to close multiple consecutive tabs with
`<Ctrl-Backspace>`.

Please see the discussion at
https://github.com/zed-industries/zed/discussions/22791 for full
motivation and the quick demo.

Release Notes:

- tab_switcher: Preserve selected position when tab is closed
```

## Parents

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

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