# Fix panel not resizing after external file deletion \(\#26378\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a364a134589167067d51899c8e69ef46e7c32dd2

Requested commit: a364a134589167067d51899c8e69ef46e7c32dd2

Commit: a364a134589167067d51899c8e69ef46e7c32dd2

Tree: d2f13c435048ef621e0a233c10c4e50da8dbebad

Author: Cristiano Pantea

Committer: GitHub

## Message

```
Fix panel not resizing after external file deletion (#26378)

Previously, when a file was deleted externally and the warning prompt
was dismissed with "Close", the panel remained but was empty, leaving an
unused split space.

This happened because pane.remove_item(...) was being called with
close_pane_if_empty set to false, preventing the panel from being
removed even when it had no remaining items.

This fix changes the third boolean parameter to true, ensuring that the
panel is removed if it becomes empty, allowing the layout to properly
resize.

Closes #23904

Release Notes:

- N/A
```

## Parents

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

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