fix(scrollbar): use current height rather than available height
with item height = 1 its the same but with height != 1 its not
This commit is contained in:
+1
-1
@@ -253,7 +253,7 @@ where
|
|||||||
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())
|
||||||
.position(start)
|
.position(start)
|
||||||
.viewport_content_length(available_height);
|
.viewport_content_length(height);
|
||||||
let scrollbar_area = full_area.inner(&self.scrollbar_margin);
|
let scrollbar_area = full_area.inner(&self.scrollbar_margin);
|
||||||
scrollbar.render(scrollbar_area, buf, &mut scrollbar_state);
|
scrollbar.render(scrollbar_area, buf, &mut scrollbar_state);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user