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 ef998e2 commit 5e2ccf9Copy full SHA for 5e2ccf9
src/components/utils/scroll_vertical.rs
@@ -36,16 +36,11 @@ impl VerticalScroll {
36
ScrollType::Down => old.saturating_add(1),
37
ScrollType::Up => old.saturating_sub(1),
38
ScrollType::PageDown => old
39
- .saturating_add(self.visual_height.get())
40
- .saturating_sub(1),
41
- ScrollType::PageUp => {
42
- if old < self.visual_height.get() {
43
- 0
44
- } else {
45
- old.saturating_sub(self.visual_height.get())
46
- .saturating_add(1)
47
- }
48
+ .saturating_sub(1)
+ .saturating_add(self.visual_height.get()),
+ ScrollType::PageUp => old
+ .saturating_add(1)
+ .saturating_sub(self.visual_height.get()),
49
ScrollType::Home => 0,
50
ScrollType::End => max,
51
};
0 commit comments