Improve scrolling on touchpads

This commit is contained in:
Jeremy Soller 2022-10-18 15:06:13 -06:00
parent e62f8b9292
commit fa8ed07dab

View file

@ -306,7 +306,7 @@ where
Event::Mouse(mouse_event) => match mouse_event { Event::Mouse(mouse_event) => match mouse_event {
MouseEvent::WheelScrolled { delta } => match delta { MouseEvent::WheelScrolled { delta } => match delta {
ScrollDelta::Lines { x, y } => { ScrollDelta::Lines { x, y } => {
buffer.action(TextAction::Scroll(-y as i32 * 6)); buffer.action(TextAction::Scroll((-y * 6.0) as i32));
Status::Captured Status::Captured
}, },
_ => Status::Ignored, _ => Status::Ignored,