diff options
author | Joe Wilm <joe@jwilm.com> | 2018-03-07 09:56:19 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2018-06-02 09:36:12 -0700 |
commit | 452126013e9fa898b801d8e8f4f26adcaaa67c69 (patch) | |
tree | be5ed5c331da25449ed2b5a0cd59cf02eb7a4199 /src/input.rs | |
parent | 8018dee1812ab88793c0f18e13335fa77c068000 (diff) | |
download | alacritty-452126013e9fa898b801d8e8f4f26adcaaa67c69.tar.gz alacritty-452126013e9fa898b801d8e8f4f26adcaaa67c69.zip |
Add SCROLL_MULTIPLIER
Scroll wheel needs some scaling so it feels like urxvt and friends.
Diffstat (limited to 'src/input.rs')
-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 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) } |