From 452126013e9fa898b801d8e8f4f26adcaaa67c69 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Wed, 7 Mar 2018 09:56:19 -0800 Subject: Add SCROLL_MULTIPLIER Scroll wheel needs some scaling so it feels like urxvt and friends. --- src/input.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input.rs b/src/input.rs index 68787979..ad9fcd39 100644 --- a/src/input.rs +++ b/src/input.rs @@ -34,6 +34,8 @@ use term::SizeInfo; use term::mode::TermMode; use util::fmt::Red; +const SCROLL_MULTIPLIER: usize = 3; + /// Processes input from glutin. /// /// An escape sequence may be emitted in case specific keys or key combinations @@ -439,7 +441,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { 65 }; - for _ in 0..(to_scroll.abs() as usize) { + for _ in 0..(to_scroll.abs() as usize * SCROLL_MULTIPLIER) { self.scroll_terminal(code, modifiers) } -- cgit v1.2.3-54-g00ecf