From aa1f31785e754107fab154002abf9bc0b129aad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20D=C3=BCrr?= Date: Mon, 25 Dec 2017 20:40:08 +0100 Subject: [PATCH] Add config option for faux scrollback Some people have complained about the behavior of faux scrollback inside of vim/tmux, however from what I can tell, alacritty behaves the same way as other terminal emulators that support faux scrollback. However there are a lot of terminal emulators that do not support faux scrollback at all, which leads to people complaining about unusual scroll behavior. This is my proposal on how to solve this issue, by giving people that do not like the VTE-Style faux scrolling the option to opt-out. --- src/config.rs | 7 ++++++- src/input.rs | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index b941c882..aace4254 100644 --- a/src/config.rs +++ b/src/config.rs @@ -65,6 +65,10 @@ fn deserialize_duration_ms<'a, D>(deserializer: D) -> ::std::result::Result Processor<'a, A> { }; for _ in 0..(to_scroll.abs() as usize) { - if self.ctx.terminal_mode().intersects(mode::TermMode::ALT_SCREEN) { + if self.mouse_config.faux_scrollback && + self.ctx.terminal_mode().intersects(mode::TermMode::ALT_SCREEN) + { // Faux scrolling if code == 64 { // Scroll up one line @@ -426,7 +428,9 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { 65 }; - if self.ctx.terminal_mode().intersects(mode::TermMode::ALT_SCREEN) { + if self.mouse_config.faux_scrollback && + self.ctx.terminal_mode().intersects(mode::TermMode::ALT_SCREEN) + { // Faux scrolling if button == 64 { // Scroll up one line