diff options
author | Joe Wilm <joe@jwilm.com> | 2018-03-07 09:56:19 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2018-03-07 09:56:19 -0800 |
commit | 8520a280f784d7fab8d4f2e03e3f27d5257efab4 (patch) | |
tree | 036d10533a3f2beaab7935f3bb5c0a52c0335ba5 | |
parent | 143c28953cca8f2a1190c94f6e6944dad391dac7 (diff) | |
download | alacritty-8520a280f784d7fab8d4f2e03e3f27d5257efab4.tar.gz alacritty-8520a280f784d7fab8d4f2e03e3f27d5257efab4.zip |
Add SCROLL_MULTIPLIER
Scroll wheel needs some scaling so it feels like urxvt and friends.
-rw-r--r-- | src/input.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input.rs b/src/input.rs index 987ce093..59cecea4 100644 --- a/src/input.rs +++ b/src/input.rs @@ -34,6 +34,8 @@ use term::SizeInfo; use term::mode::{self, 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 @@ -397,7 +399,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(mouse_modes, code) } |