# Add action listener to workspace for pane::CloseActiveItem \(\#46421\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 54929011b18d0def4e1bf6c3b1be488c086bf5e2

Requested commit: 54929011b18d0def4e1bf6c3b1be488c086bf5e2

Commit: 54929011b18d0def4e1bf6c3b1be488c086bf5e2

Tree: 54ae8c3140dc9cea686c117df9e9e41d6479a1b8

Author: Josh P\.

Committer: GitHub

## Message

```
Add action listener to workspace for pane::CloseActiveItem (#46421)

When focus is on a dock panel that doesn't contain a pane (e.g., project
panel), `pane::CloseActiveItem` will now close the active item in the center
pane instead of doing nothing.

This allows users to bind, for example, `cmd-w` to `pane::CloseActiveItem` 
and have it work consistently regardless of whether focus is on a dock 
panel or the editor.

Closes #45261

Release Notes:

- Improved `pane::CloseActiveItem` to close center pane items even when
focus is on a dock panel like the project panel or outline panel

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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