diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index 50655df1..c307b854 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -170,7 +170,7 @@ impl FloatingText { fn scroll_down(&mut self) { let visible_lines = self.frame_height.saturating_sub(2); - if self.v_scroll + visible_lines < self.src.len() { + if self.v_scroll + visible_lines < self.wrapped_lines.len() { self.v_scroll += 1; } }