fix(scrollbar): workaround overscroll

This commit is contained in:
EdJoPaTo
2024-02-24 03:07:23 +01:00
parent ce3b2b530e
commit 98b53e448f
+2 -1
View File
@@ -254,7 +254,8 @@ where
#[cfg(feature = "experimental_scrollbar")]
if let Some(scrollbar) = self.scrollbar {
let mut scrollbar_state = ratatui::widgets::ScrollbarState::new(visible.len())
let mut scrollbar_state =
ratatui::widgets::ScrollbarState::new(visible.len().saturating_sub(height))
.position(start)
.viewport_content_length(height);
let scrollbar_area = Rect {