Fix #167 r3: repair renumber verify pass referencing removed tops variable
e1056df (PR #200) rewrote renumber() to derive placement from rowIdx but
left the post-placement verify pass reading a removed 'tops' variable;
wrap-ON renumbering threw ReferenceError on every pass and the rAF
re-check never ran. Rebuild 'placed' from rowIdx directly. No behavior
change on the happy path; restores the reflow re-verify safety net.
This commit is contained in:
@@ -76,8 +76,8 @@
|
|||||||
// settle a hair under N * line-height after the gutter is rebuilt; a
|
// settle a hair under N * line-height after the gutter is rebuilt; a
|
||||||
// gutter pass that changes the code column width reflows it. Verify the
|
// gutter pass that changes the code column width reflows it. Verify the
|
||||||
// placement one frame later and re-run if any line's row moved (#167).
|
// placement one frame later and re-run if any line's row moved (#167).
|
||||||
var placed = {};
|
// rowIdx already holds each line's placement row for this pass.
|
||||||
for (var q = 0; q < tops.length; q++) placed[q] = Math.round((tops[q] - bodyTop) / lh);
|
var placed = rowIdx.slice();
|
||||||
requestAnimationFrame(function () {
|
requestAnimationFrame(function () {
|
||||||
var moved = false;
|
var moved = false;
|
||||||
var tops2 = [];
|
var tops2 = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user