Skip to content

editor: Refactor excerpts removed event handling#50695

Merged
Veykril merged 1 commit intomainfrom
50521-refactor
Mar 4, 2026
Merged

editor: Refactor excerpts removed event handling#50695
Veykril merged 1 commit intomainfrom
50521-refactor

Conversation

@dinocosta
Copy link
Copy Markdown
Member

Refactor the changes introduced in #50525, in order to remove the DisplayMap.clear_folded_buffer method and update the editor's handling of multi_buffer::Event::ExcerptsRemoved to actually call DisplayMap.unfold_buffers, which correctly updates the BlockMap using its BlockMapWriter, ensuring that the block map is synced.

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • N/A

Remove the `DisplayMap.clear_folded_buffer` method and update the
editor's handling of `multi_buffer::Event::ExcerptsRemoved` to actually
call `DisplayMap.unfold_buffers`, which correctly updates the `BlockMap`
using its `BlockMapWriter`, ensuring that the block map is synced.
@dinocosta dinocosta self-assigned this Mar 4, 2026
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 4, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 4, 2026
@Veykril Veykril merged commit 0b58d34 into main Mar 4, 2026
38 checks passed
@Veykril Veykril deleted the 50521-refactor branch March 4, 2026 12:11
wzulfikar pushed a commit to wzulfikar/zed that referenced this pull request Mar 4, 2026
Refactor the changes introduced in
zed-industries#50525, in order to remove the
`DisplayMap.clear_folded_buffer` method and update the editor's handling
of `multi_buffer::Event::ExcerptsRemoved` to actually call
`DisplayMap.unfold_buffers`, which correctly updates the `BlockMap`
using its `BlockMapWriter`, ensuring that the block map is synced.

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects
- [X] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants