Skip to content

helix: Fix crash while moving through selections#52922

Merged
Veykril merged 3 commits intozed-industries:mainfrom
feitreim:bugfix-helix-select-crash
Apr 2, 2026
Merged

helix: Fix crash while moving through selections#52922
Veykril merged 3 commits intozed-industries:mainfrom
feitreim:bugfix-helix-select-crash

Conversation

@feitreim
Copy link
Copy Markdown
Contributor

@feitreim feitreim commented Apr 1, 2026

Closes #51573
Closes #52852 * I believe, looking for verification of that.

A very similar issue was belived to be fixed with #51642 , however it seems like there is still some edge cases that were causing crashes. These issues appeared to me to be caused by the dedup method failing to catch sub-ranges (created by entering SelectMode after the search) as duplicates.

two new tests that isolate the case in 51573 and 52852 respectively.

fixed vid:

after.mov

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • helix: Fix search selection range deduplication logic
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 1, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator Bot requested review from a team, Veykril and dinocosta and removed request for a team April 1, 2026 19:28
@zed-community-bot zed-community-bot Bot added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Apr 1, 2026
Copy link
Copy Markdown
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril enabled auto-merge (squash) April 2, 2026 06:36
@Veykril
Copy link
Copy Markdown
Member

Veykril commented Apr 2, 2026

Yea that dedup isn't quite right, we could end up with ranges resolving to same offsets but differing due to timestamps I think

@Veykril Veykril merged commit 65e7550 into zed-industries:main Apr 2, 2026
30 checks passed
@feitreim feitreim deleted the bugfix-helix-select-crash branch April 2, 2026 19:35
piper-of-dawn pushed a commit to piper-of-dawn/zed that referenced this pull request Apr 25, 2026
Closes zed-industries#51573
Closes zed-industries#52852 * I believe, looking for verification of that.

A very similar issue was belived to be fixed with zed-industries#51642 , however it
seems like there is still some edge cases that were causing crashes.
These issues appeared to me to be caused by the dedup method failing to
catch sub-ranges (created by entering SelectMode after the search) as
duplicates.

two new tests that isolate the case in 51573 and 52852 respectively.

fixed vid:


https://github.com/user-attachments/assets/f62d5210-6cb3-4bdf-a061-efc265eb2804



Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable



Release Notes:

- helix: Fix search selection range deduplication logic
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 guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

2 participants