diff --git a/internal/web/static/paste-lines.js b/internal/web/static/paste-lines.js index 231a473..9853c3d 100644 --- a/internal/web/static/paste-lines.js +++ b/internal/web/static/paste-lines.js @@ -76,8 +76,8 @@ // 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 // placement one frame later and re-run if any line's row moved (#167). - var placed = {}; - for (var q = 0; q < tops.length; q++) placed[q] = Math.round((tops[q] - bodyTop) / lh); + // rowIdx already holds each line's placement row for this pass. + var placed = rowIdx.slice(); requestAnimationFrame(function () { var moved = false; var tops2 = [];