Merge pull request #22 from almusil/fix_scrolling

Fix underflow in scrolling
This commit is contained in:
Yuri Iozzelli 2021-01-21 16:51:51 +01:00 committed by GitHub
commit 2b7ee112fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,7 +225,7 @@ where
scroller.top_offset += num_lines;
if scroller.top_offset > (scroller.height - scroller.fixed_bottom_lines) {
scroller.top_offset = scroller.fixed_top_lines
+ (scroller.top_offset - scroller.height + scroller.fixed_bottom_lines)
+ (scroller.top_offset + scroller.fixed_bottom_lines - scroller.height)
}
self.command(