fix(scrollbar): workaround overscroll
This commit is contained in:
+4
-3
@@ -254,9 +254,10 @@ 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 =
|
||||||
.position(start)
|
ratatui::widgets::ScrollbarState::new(visible.len().saturating_sub(height))
|
||||||
.viewport_content_length(height);
|
.position(start)
|
||||||
|
.viewport_content_length(height);
|
||||||
let scrollbar_area = Rect {
|
let scrollbar_area = Rect {
|
||||||
y: full_area.y.saturating_add(self.scrollbar_margin.0),
|
y: full_area.y.saturating_add(self.scrollbar_margin.0),
|
||||||
height: full_area
|
height: full_area
|
||||||
|
|||||||
Reference in New Issue
Block a user