Commit 14d6a00
fix: inclusive visible-line range in page up/down sizing
Addresses Qodo review: scroll.getVisibleLineRange() returns an inclusive
end index, but visibleLogicalLines was computed as (end - start), which
is one fewer than the logical lines actually summed into
totalPixelHeight. The viewport ratio therefore underestimated the page
increment by one line in the common case. Use (end - start + 1) to
match the loop bounds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 430ebdd commit 14d6a00
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2880 | 2880 | | |
2881 | 2881 | | |
2882 | 2882 | | |
2883 | | - | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
2884 | 2887 | | |
2885 | 2888 | | |
2886 | 2889 | | |
| |||
0 commit comments