Fix #167: gutter renumbers to visual rows when line wrap is on #190

Closed
fen wants to merge 1 commits from fix-167 into dev
Collaborator

With line wrapping enabled, a logical line can occupy several visual rows. The paste viewer gutter now renumbers from the actual wrapped height of each per-line block (external paste-lines.js), with blank gutter rows keeping numbers aligned with line starts. The gutter width is pinned (flex 0 0 auto) so its row count cannot feed back into the code column layout. Verified in headless chromium: counts, numbering, alignment, and no horizontal scroll all correct for long unbroken lines and mixed content, on reload and live toggle.

With line wrapping enabled, a logical line can occupy several visual rows. The paste viewer gutter now renumbers from the actual wrapped height of each per-line block (external paste-lines.js), with blank gutter rows keeping numbers aligned with line starts. The gutter width is pinned (flex 0 0 auto) so its row count cannot feed back into the code column layout. Verified in headless chromium: counts, numbering, alignment, and no horizontal scroll all correct for long unbroken lines and mixed content, on reload and live toggle.
fen added 1 commit 2026-09-10 16:50:10 +00:00
Fix #167: renumber gutter to visual rows when line wrap is on
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 41s
26a00257b0
Split the paste codebody into per-line block spans (paste-lines.js) and
rebuild the gutter from each line's wrapped height so numbers count
visual rows, not logical lines. Pinned the gutter width (flex 0 0 auto,
3ch) so its row count no longer feeds back into the code column width.
ResizeObserver renumbers on wrap toggle / resize; wrap-off behavior is
unchanged (one number per newline).
fen closed this pull request 2026-09-10 16:50:56 +00:00
fen deleted branch fix-167 2026-09-10 16:50:56 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.