aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.rs12
-rw-r--r--src/input.rs9
2 files changed, 7 insertions, 14 deletions
diff --git a/src/config.rs b/src/config.rs
index 8e531a9c..e7f1b587 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -385,18 +385,6 @@ pub struct Config {
scrolling: Scrolling,
}
-fn deserialize_scroll_history<'a, D>(deserializer: D) -> ::std::result::Result<u32, D::Error>
- where D: de::Deserializer<'a>
-{
- match u32::deserialize(deserializer) {
- Ok(lines) => Ok(lines),
- Err(err) => {
- eprintln!("problem with config: {}; Using default value", err);
- Ok(default_scroll_history())
- },
- }
-}
-
fn failure_default_vec<'a, D, T>(deserializer: D) -> ::std::result::Result<Vec<T>, D::Error>
where D: de::Deserializer<'a>,
T: Deserialize<'a>
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)