diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index f6aba95a..89d42bb3 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -188,7 +188,7 @@ impl FloatingText { } fn scroll_down(&mut self) { - let visible_lines = self.get_visible_lines(); + let visible_lines = self.frame_height.saturating_sub(2); if self.v_scroll + visible_lines < self.src.len() { self.v_scroll += 1; } @@ -211,10 +211,6 @@ impl FloatingText { self.h_scroll += 1; } } - - fn get_visible_lines(&self) -> usize { - self.frame_height.saturating_sub(2) - } } impl FloatContent for FloatingText {