We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e69f25 commit a5b898cCopy full SHA for a5b898c
src/ui/mod.rs
@@ -22,7 +22,7 @@ pub const fn calc_scroll_top(
22
height_in_lines: usize,
23
selection: usize,
24
) -> usize {
25
- if current_top + height_in_lines <= selection {
+ if current_top.saturating_add(height_in_lines) <= selection {
26
selection.saturating_sub(height_in_lines) + 1
27
} else if current_top > selection {
28
selection
0 commit comments