diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-02 13:44:05 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-02 13:44:05 +0100 |
commit | b1d72521e598bcafd446bf3263361e1ae3d6e055 (patch) | |
tree | dd7ff1ed81dbc5079162139e43725891bc497176 /src/local | |
parent | d16a0aeee4a7c6fd485b4286db4c56f83d966853 (diff) | |
download | chawan-b1d72521e598bcafd446bf3263361e1ae3d6e055.tar.gz |
container: fix off-by-one error in scrollDown
Diffstat (limited to 'src/local')
-rw-r--r-- | src/local/container.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/local/container.nim b/src/local/container.nim index dfda1f49..da33a9fb 100644 --- a/src/local/container.nim +++ b/src/local/container.nim @@ -1017,7 +1017,7 @@ proc cursorRightEdge(container: Container) {.jsfunc.} = container.setCursorX(container.fromx + container.width - 1) proc scrollDown*(container: Container, n = 1) {.jsfunc.} = - let H = container.numLines - 1 + let H = container.numLines let y = min(container.fromy + container.height + n, H) - container.height if y > container.fromy: container.setFromY(y) |