Skip to content

Fix markdown table selection alignment - #58006

Closed
ShrootBuck wants to merge 1 commit into
zed-industries:mainfrom
ShrootBuck:fix-markdown-table-selection-alignment
Closed

Fix markdown table selection alignment#58006
ShrootBuck wants to merge 1 commit into
zed-industries:mainfrom
ShrootBuck:fix-markdown-table-selection-alignment

Conversation

@ShrootBuck

@ShrootBuck ShrootBuck commented May 28, 2026

Copy link
Copy Markdown

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

Fixes markdown selection and copy hit areas for center- and right-aligned table text.

Rendered markdown lines now keep their alignment, and source-position hit testing plus selection highlight bounds apply the same per-row alignment offset as the painted text. This keeps selectable/copyable table text aligned with what users see without changing the underlying copied Markdown. There are before and after videos below that probably make more sense than what I wrote above.

Before:

before.mov

After:

after.mov

Release Notes:

  • Fixed markdown table text selection/copy alignment for centered and right-aligned cells.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 28, 2026
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label May 28, 2026
@ShrootBuck
ShrootBuck marked this pull request as draft May 28, 2026 22:46
@ShrootBuck
ShrootBuck force-pushed the fix-markdown-table-selection-alignment branch from 6a2106d to 8a30a90 Compare May 28, 2026 22:49
@ShrootBuck
ShrootBuck marked this pull request as ready for review May 28, 2026 22:54
@RemcoSmitsDev

Copy link
Copy Markdown
Collaborator

Hey not sure if you know but there is already a PR up for this. Duplicate of: #57283

@ShrootBuck

Copy link
Copy Markdown
Author

oh, thanks for letting me know!

@ShrootBuck ShrootBuck closed this May 29, 2026
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 first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants