vim: Fix helix select next match panic when search wraps around (#51642)

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
357ee0fa3fLukas Wirth committed on 3/16/2026, 10:14:26 AM· committed by GitHubparent923b512
1 file changedLine totals unavailable