Revision follow-up for #167 / PR #179 line of work.
The settle-check pass in renumber() referenced an undeclared variable tops, so every wrap-on renumber threw 'ReferenceError: tops is not defined' and the one-frame re-verification never ran. This restores the intended idempotent settle-check (captures placed rows from measured codeline tops and re-runs if reflow moves any line).
Verified locally (fresh build, headless chromium + CDP probes): 5-line paste with long unbroken line 3, wrap ON at 1400x900 and 375x812 -> one .gutline per visual row, every number dRow=0/dPx=0 vs its line start, no horizontal scroll; wrap OFF unchanged ('1\n2\n3\n4\n5'); zero console/CSP errors. go build ./... && go test ./... pass.
Revision follow-up for #167 / PR #179 line of work.
The settle-check pass in renumber() referenced an undeclared variable `tops`, so every wrap-on renumber threw 'ReferenceError: tops is not defined' and the one-frame re-verification never ran. This restores the intended idempotent settle-check (captures placed rows from measured codeline tops and re-runs if reflow moves any line).
Verified locally (fresh build, headless chromium + CDP probes): 5-line paste with long unbroken line 3, wrap ON at 1400x900 and 375x812 -> one .gutline per visual row, every number dRow=0/dPx=0 vs its line start, no horizontal scroll; wrap OFF unchanged ('1\n2\n3\n4\n5'); zero console/CSP errors. go build ./... && go test ./... pass.
Fixes #167
QA of the #167 follow-up found two defects:
1) renumber() referenced an undefined 'tops' variable in the rAF
re-verification pass, so any wrap toggle that reflowed a partially
filled last visual row left stale (non-idempotent) numbering.
2) rows were derived from per-span heights while the code column also
renders newline text nodes between .codeline blocks, so the gutter
could drift from the code column's real visual rows.
renumber() now measures each .codeline's actual offsetTop and places
every number on the visual row its line starts on (a line wrapping to N
rows gets its number on the first of them), pads filler rows in between,
and self-corrects one frame later if reflow moves any line. Wrap-OFF
path stays unchanged ('1
2
3
4'). Verified in headless Chromium:
gutter/code row alignment exact at 1200px and 640px, toggle cycles
stable, no horizontal scroll, no CSP console errors; go build/test pass.
Closing as superseded: the fix landed via fix-167-r2 (dev tip 5c6cd40, QA passed 2026-09-10). Issue is closed; deleting the stale fix-167 branch per branch hygiene.
Closing as superseded: the fix landed via fix-167-r2 (dev tip 5c6cd40, QA passed 2026-09-10). Issue is closed; deleting the stale fix-167 branch per branch hygiene.
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Revision follow-up for #167 / PR #179 line of work.
The settle-check pass in renumber() referenced an undeclared variable
tops, so every wrap-on renumber threw 'ReferenceError: tops is not defined' and the one-frame re-verification never ran. This restores the intended idempotent settle-check (captures placed rows from measured codeline tops and re-runs if reflow moves any line).Verified locally (fresh build, headless chromium + CDP probes): 5-line paste with long unbroken line 3, wrap ON at 1400x900 and 375x812 -> one .gutline per visual row, every number dRow=0/dPx=0 vs its line start, no horizontal scroll; wrap OFF unchanged ('1\n2\n3\n4\n5'); zero console/CSP errors. go build ./... && go test ./... pass.
Fixes #167
Closing as superseded: the fix landed via fix-167-r2 (dev tip
5c6cd40, QA passed 2026-09-10). Issue is closed; deleting the stale fix-167 branch per branch hygiene.Pull request closed