Skip to content

Fix wrapped code block selection geometry#98

Draft
917Dhj wants to merge 1 commit into
nodes-app:mainfrom
917Dhj:fix/code-block-selection-geometry-upstream
Draft

Fix wrapped code block selection geometry#98
917Dhj wants to merge 1 commit into
nodes-app:mainfrom
917Dhj:fix/code-block-selection-geometry-upstream

Conversation

@917Dhj

@917Dhj 917Dhj commented Jul 13, 2026

Copy link
Copy Markdown

What changed

  • Preserve each TextKit selection segment's vertical bounds when cutting the code-block background.
  • Add a regression test covering selection across wrapped code lines.

Why

The current renderer expands every selection segment to the full layout-fragment height. When a fenced code block wraps, those cutouts overlap unrelated visual lines and produce vertical bars, L-shaped gaps, and broken selection backgrounds.

Impact

Wrapped code-block selections now stay aligned with their visual lines. Markdown parsing, styling, and non-code selection behavior are unchanged.

Verification

  • swift test — 188 tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant