fix(scrollbar): workaround overscroll
This commit is contained in:
+2
-1
@@ -254,7 +254,8 @@ where
|
|||||||
|
|
||||||
#[cfg(feature = "experimental_scrollbar")]
|
#[cfg(feature = "experimental_scrollbar")]
|
||||||
if let Some(scrollbar) = self.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)
|
.position(start)
|
||||||
.viewport_content_length(height);
|
.viewport_content_length(height);
|
||||||
let scrollbar_area = Rect {
|
let scrollbar_area = Rect {
|
||||||
|
|||||||
Reference in New Issue
Block a user