summaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2018-03-09 23:02:45 +0100
committerJoe Wilm <joe@jwilm.com>2018-06-02 09:46:20 -0700
commita238e9ac5832cb9a40f886a3b873728cd7890d01 (patch)
treee078fc74f03e5ad56d33f9bd9897a87d1912f06b /src/input.rs
parentd3f64072f3fe4d31f7a60eb0cb17a98096617b4b (diff)
downloadalacritty-a238e9ac5832cb9a40f886a3b873728cd7890d01.tar.gz
alacritty-a238e9ac5832cb9a40f886a3b873728cd7890d01.zip
Fix linux config default value
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs
index 3ff631e0..16fddc2c 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -439,7 +439,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
65
};
- let scrolling_multiplier = self.mouse_config.normal_scrolling_lines;
+ let scrolling_multiplier = self.scrolling_config.multiplier;
for _ in 0..(to_scroll.abs() as usize) {
self.scroll_terminal(code, modifiers, scrolling_multiplier)
}
@@ -477,8 +477,13 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
fn scroll_terminal(&mut self, code: u8, modifiers: ModifiersState, scroll_multiplier: u8) {
debug_assert!(code == 64 || code == 65);
- let faux_scrollback_lines = self.mouse_config.faux_scrollback_lines;
let mouse_modes = TermMode::MOUSE_REPORT_CLICK | TermMode::MOUSE_DRAG | TermMode::MOUSE_MOTION;
+
+ // Make sure the new and deprecated setting are both allowed
+ let faux_scrollback_lines = self.mouse_config
+ .faux_scrollback_lines
+ .unwrap_or(self.scrolling_config.faux_multiplier as usize);
+
if self.ctx.terminal_mode().intersects(mouse_modes) {
self.mouse_report(code, ElementState::Pressed, modifiers);
} else if self.ctx.terminal_mode().contains(TermMode::ALT_SCREEN)