From 2f1a390aaad188d1cad9fc689620ae90e027cc8a Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Mon, 20 Jan 2020 23:03:54 +0300 Subject: [PATCH] Remove scrolling.auto_scroll feature Fixes: #1873 --- CHANGELOG.md | 4 ++++ alacritty.yml | 3 --- alacritty/src/config/mod.rs | 8 ++++++++ alacritty_terminal/src/config/scrolling.rs | 4 +++- alacritty_terminal/src/term/mod.rs | 10 ---------- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0598feda..6d056778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Blurred icons in KDE task switcher (alacritty.ico is now high-res) - Consecutive builds failing on macOS due to preexisting `/Application` symlink +### Removed + +- Config option `auto_scroll`, which is now always disabled + ## 0.4.1 ### Packaging diff --git a/alacritty.yml b/alacritty.yml index 63d1927b..ab176bdd 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -87,9 +87,6 @@ # scrollback is enabled (history > 0). #multiplier: 3 - # Scroll to the bottom when new text is written to the terminal. - #auto_scroll: false - # Spaces per Tab (changes require restart) # # This setting defines the width of a tab in cells. diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index 19889887..56e09be7 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -204,6 +204,14 @@ fn print_deprecation_warnings(config: &Config) { lines" ); } + + if config.scrolling.auto_scroll.is_some() { + warn!( + target: LOG_TARGET_CONFIG, + "Config scrolling.auto_scroll has been removed and is now always disabled, it can be \ + safely removed from the config" + ); + } } #[cfg(test)] diff --git a/alacritty_terminal/src/config/scrolling.rs b/alacritty_terminal/src/config/scrolling.rs index 1746266f..358abc3b 100644 --- a/alacritty_terminal/src/config/scrolling.rs +++ b/alacritty_terminal/src/config/scrolling.rs @@ -11,8 +11,10 @@ pub struct Scrolling { history: ScrollingHistory, #[serde(deserialize_with = "failure_default")] multiplier: ScrollingMultiplier, + + // TODO: REMOVED #[serde(deserialize_with = "failure_default")] - pub auto_scroll: bool, + pub auto_scroll: Option, // TODO: DEPRECATED #[serde(deserialize_with = "failure_default")] diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 8edf3d3f..9cd1f75b 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -775,9 +775,6 @@ pub struct Term { /// Number of spaces in one tab tabspaces: usize, - /// Automatically scroll to bottom when new lines are added - auto_scroll: bool, - /// Clipboard access coupled to the active window clipboard: Clipboard, @@ -911,7 +908,6 @@ impl Term { default_cursor_style: config.cursor.style, dynamic_title: config.dynamic_title(), tabspaces, - auto_scroll: config.scrolling.auto_scroll, clipboard, event_proxy, is_focused: true, @@ -936,7 +932,6 @@ impl Term { } self.default_cursor_style = config.cursor.style; self.dynamic_title = config.dynamic_title(); - self.auto_scroll = config.scrolling.auto_scroll; self.grid.update_history(config.scrolling.history() as usize, &self.cursor.template); } @@ -1299,11 +1294,6 @@ impl Handler for Term { /// A character to be displayed #[inline] fn input(&mut self, c: char) { - // If enabled, scroll to bottom when character is received - if self.auto_scroll { - self.scroll_display(Scroll::Bottom); - } - // Number of cells the char will occupy let width = match c.width() { Some(width) => width,