diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index a43361af..89f67c54 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -171,7 +171,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; } }