Skip to content

markdown: Make highlighting of rendered markdown more accurate#54744

Merged
NeelChotai merged 4 commits intozed-industries:mainfrom
timvermeulen:markdown-accurate-selection-highlights
Apr 24, 2026
Merged

markdown: Make highlighting of rendered markdown more accurate#54744
NeelChotai merged 4 commits intozed-industries:mainfrom
timvermeulen:markdown-accurate-selection-highlights

Conversation

@timvermeulen
Copy link
Copy Markdown
Contributor

Paints selections and search highlights of rendered markdown more accurately, to properly match what's actually being selected.

Particularly noticeable when the selection spans multiple rows in a table cell or when it starts right after a soft wrap.

Before After
before after

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:

  • Fixed selection and search highlights in rendered markdown not always being displayed accurately.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 24, 2026
@github-actions github-actions Bot added the community champion Issues filed by our amazing community champions! 🫶 label Apr 24, 2026
@NeelChotai NeelChotai assigned NeelChotai and unassigned smitbarmase Apr 24, 2026
@NeelChotai
Copy link
Copy Markdown
Member

NeelChotai commented Apr 24, 2026

this is fantastic - I've noticed it personally, thank you for fixing!

@NeelChotai NeelChotai enabled auto-merge April 24, 2026 12:50
@NeelChotai NeelChotai added this pull request to the merge queue Apr 24, 2026
Merged via the queue into zed-industries:main with commit 2595391 Apr 24, 2026
33 checks passed
@timvermeulen timvermeulen deleted the markdown-accurate-selection-highlights branch April 24, 2026 13:21
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…ndustries#54744)

Paints selections and search highlights of rendered markdown more
accurately, to properly match what's actually being selected.

Particularly noticeable when the selection spans multiple rows in a
table cell or when it starts right after a soft wrap.

|Before|After|
| --- | --- |
|<img width="831" height="677" alt="before"
src="https://github.com/user-attachments/assets/3b2c33be-e4cb-400f-9ba6-4163eb438f99"
/> | <img width="831" height="677" alt="after"
src="https://github.com/user-attachments/assets/04161dd8-7f4a-46c5-8c63-3497d3533f6d"
/> |


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:

- Fixed selection and search highlights in rendered markdown not always
being displayed accurately.
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 community champion Issues filed by our amazing community champions! 🫶

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants