Skip to content

markdown: Add debug_asserts for search result ordering - #59483

Merged
Veykril merged 1 commit into
mainfrom
markdown-optimize-paint-highlights
Jun 17, 2026
Merged

markdown: Add debug_asserts for search result ordering#59483
Veykril merged 1 commit into
mainfrom
markdown-optimize-paint-highlights

Conversation

@bennetbo

Copy link
Copy Markdown
Member

Follow up to #59473

The previous code could actually highlight the wrong match if you passed in unordered ranges.
However, i realized that all codepaths are passing in ordered matches already, so I just added some debug_asserts to ensure that this is always the case.

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 17, 2026
@bennetbo bennetbo changed the title Markdown optimize paint highlights markdown: Add debug_asserts for search result ordering Jun 17, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 17, 2026
@bennetbo
bennetbo force-pushed the markdown-optimize-paint-highlights branch from 232b2d3 to f644cee Compare June 17, 2026 14:15
@bennetbo
bennetbo added this pull request to the merge queue Jun 17, 2026
@bennetbo
bennetbo removed this pull request from the merge queue due to a manual request Jun 17, 2026
@Veykril
Veykril added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 92399c6 Jun 17, 2026
32 checks passed
@Veykril
Veykril deleted the markdown-optimize-paint-highlights branch June 17, 2026 18:56
This was referenced Jun 18, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…s#59483)

Follow up to zed-industries#59473

The previous code could actually highlight the wrong match if you passed
in unordered ranges.
However, i realized that all codepaths are passing in ordered matches
already, so I just added some `debug_asserts` to ensure that this is
always the case.

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