Review scroll calculations in PageList Zig file

Medium
Unlisted
Check my `row` scroll logic in @src/terminal/PageList.zig in the `scroll` function and verify all the calculations are correct.

Found two critical bugs in the .row scroll case:

Bug 1: Forward traversal (lines 1960-1974)

  • Uses <= instead of < and wrong y-coordinate calculation
  • Currently: y = node.data.size.rows - rem (inverted)
  • Should be: y = rem (direct mapping)

Bug 2: Backward traversal (lines 1975-1989)

  • Initializes rem = n but should count from bottom: rem = self.total_rows - n

The boundary check n >= self.total_rows - self.rows is correct, and .delta_row logic looks good.

Fix both of those bugs.

Done. Fixed both bugs:

  1. Forward traversal: Changed <= to < and y = node.data.size.rows - rem to y = rem
  2. Backward traversal: Changed rem = n_cellint to rem = total_cellint - n_cellint to count from the bottom