Skip to content

vim: Fix helix select next match panic when search wraps around (#51642) (cherry-pick to preview)#51649

Merged
zed-zippy[bot] merged 1 commit intov0.228.xfrom
cherry-pick-v0.228.x-357ee0fa
Mar 16, 2026
Merged

vim: Fix helix select next match panic when search wraps around (#51642) (cherry-pick to preview)#51649
zed-zippy[bot] merged 1 commit intov0.228.xfrom
cherry-pick-v0.228.x-357ee0fa

Conversation

@zed-zippy
Copy link
Copy Markdown
Contributor

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

Cherry-pick of #51642 to preview


Fixes ZED-4YP

Sort and deduplicate anchor ranges in do_helix_select before passing
them to select_anchor_ranges. When the search wraps past the end of the
document back to the beginning, the new selection is at a lower offset
than the accumulated prior selections, producing unsorted anchors that
crash the rope cursor with 'cannot summarize backward'.

Release Notes:

  • Fixed a panic in helix mode with search selecting wrapping around the
    document end

Fixes ZED-4YP

Sort and deduplicate anchor ranges in do_helix_select before passing
them to select_anchor_ranges. When the search wraps past the end of the
document back to the beginning, the new selection is at a lower offset
than the accumulated prior selections, producing unsorted anchors that
crash the rope cursor with 'cannot summarize backward'.


Release Notes:

- Fixed a panic in helix mode with search selecting wrapping around the
document end
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 16, 2026
@zed-community-bot zed-community-bot bot added the bot Pull requests authored by a bot label Mar 16, 2026
@zed-zippy zed-zippy bot merged commit 20ed6dc into v0.228.x Mar 16, 2026
39 checks passed
@zed-zippy zed-zippy bot deleted the cherry-pick-v0.228.x-357ee0fa branch March 16, 2026 10:20
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