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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on match with multiple selections in helix mode Crash on multiple selections in Helix mode at end of file

2 participants