Skip to main content

render_scrollable

Function render_scrollable 

Source
pub fn render_scrollable<'a>(
    frame: &mut Frame<'_>,
    area: Rect,
    lines: Vec<Line<'a>>,
    scroll: &ScrollState,
    block: Block<'a>,
)
Expand description

Render lines into area with visual-line-aware scrolling.

Handles both auto-scroll (pinned to bottom) and manual scroll modes. Uses Wrap { trim: false } so long lines wrap naturally.

The block is rendered first; scrollable content fills its inner area. Over-scroll is clamped — you can’t scroll past the first line.