From be6b7a8919616d24bfdb01caf5d86ee9986edb6f Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 1 Mar 2024 09:11:43 -0800 Subject: [PATCH] Remove scroll following --- src/tui/mod.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/tui/mod.rs b/src/tui/mod.rs index 1446c44c..20b5cf9e 100644 --- a/src/tui/mod.rs +++ b/src/tui/mod.rs @@ -122,18 +122,10 @@ impl Tui { self.scroll_offset = min(self.scroll_max(), scroll_offset); } - fn maybe_follow(&mut self) { - let height = self.size().height as usize; - if self.scroll_offset >= self.line_count - height - 1 { - self.scroll_offset += 1; - } - } - fn push_line(&mut self, line: String) { self.scrollback.extend(line.into_bytes()); self.scrollback.push(b'\n'); self.line_count += 1; - self.maybe_follow(); } #[instrument(level = "trace", skip(self))]