Skip to main content

render_scrollbar

Function render_scrollbar 

Source
pub fn render_scrollbar(
    area: Rect,
    buf: &mut Buffer,
    total: usize,
    capacity: usize,
    start: usize,
    style: &ScrollbarStyle,
)
Expand description

Render a vertical scrollbar into area, sizing the thumb from total content rows, the visible capacity (rows that fit at once) and the current start scroll offset. A no-op when the area is empty or the content already fits (total <= capacity), so callers can call it unconditionally.