Skip to content

Fix expand/collapse all button for splittable editor (#50859) (cherry-pick to preview)#51124

Merged
zed-zippy[bot] merged 1 commit intov0.227.xfrom
cherry-pick-v0.227.x-fbeffc4f
Mar 9, 2026
Merged

Fix expand/collapse all button for splittable editor (#50859) (cherry-pick to preview)#51124
zed-zippy[bot] merged 1 commit intov0.227.xfrom
cherry-pick-v0.227.x-fbeffc4f

Conversation

@zed-zippy
Copy link
Copy Markdown
Contributor

@zed-zippy zed-zippy bot commented Mar 9, 2026

Cherry-pick of #50859 to preview


The "Expand All Files"/"Collapse All Files" button in BufferSearchBar
was broken for SplittableEditor, which is used in the project diff
view. It was happening because ProjectDiff::as_searchable returns an
handle to the SplittableEditor, which the search bar implementation
then tries to downcast to an Editor, which the SplittableEditor did
not support, so both the expand/collapse all buttons, as well as the
collapse state were broken.

Unfortunately this was accidentally introduced in
#48773 , so this Pull Request
updates the Item implementation for SplittableEditor in order for it
to be able to act as an Editor.

Release Notes:

  • Fix the "Expand All Files"/"Collapse All Files" button in the project
    diff view

Co-authored-by: Tom Houlé tom@tomhoule.com

The "Expand All Files"/"Collapse All Files" button in `BufferSearchBar`
was broken for `SplittableEditor`, which is used in the project diff
view. It was happening because `ProjectDiff::as_searchable` returns an
handle to the `SplittableEditor`, which the search bar implementation
then tries to downcast to an `Editor`, which the `SplittableEditor` did
not support, so both the expand/collapse all buttons, as well as the
collapse state were broken.

Unfortunately this was accidentally introduced in
#48773 , so this Pull Request
updates the `Item` implementation for `SplittableEditor` in order for it
to be able to act as an `Editor`.

Release Notes:

- Fix the "Expand All Files"/"Collapse All Files" button in the project
diff view

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 9, 2026
@zed-community-bot zed-community-bot bot added the bot Pull requests authored by a bot label Mar 9, 2026
@zed-zippy zed-zippy bot merged commit 5a59d48 into v0.227.x Mar 9, 2026
38 checks passed
@zed-zippy zed-zippy bot deleted the cherry-pick-v0.227.x-fbeffc4f branch March 9, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant