Added scroll-to-edge.

This commit is contained in:
Mikayla Maki 2022-08-22 18:24:58 -07:00
parent 01e3f118b2
commit 77670cbc7c
4 changed files with 59 additions and 28 deletions

View file

@ -33,12 +33,11 @@ impl Modifiers {
}
}
//TODO: Determine if I should add modifiers into the ScrollWheelEvent type
fn from_scroll() -> Self {
fn from_scroll(scroll: &ScrollWheelEvent) -> Self {
Modifiers {
ctrl: false,
shift: false,
alt: false,
ctrl: scroll.ctrl,
shift: scroll.shift,
alt: scroll.alt,
}
}
}
@ -123,7 +122,7 @@ pub fn scroll_report(
point,
MouseButton::from_scroll(e),
true,
Modifiers::from_scroll(),
Modifiers::from_scroll(e),
MouseFormat::from_mode(mode),
)
.map(|report| repeat(report).take(max(scroll_lines, 1) as usize))