Expand description
Visual-line-aware scrollable text rendering.
Ratatui’s Paragraph::scroll() counts visual lines (post-wrap), but most
callers only know logical line counts. When Wrap is enabled, long lines
expand into multiple visual rows, so a naïve total_logical - viewport scroll
offset falls short of the true bottom.
ScrollState + render_scrollable() solve this by computing visual line
counts the same way ratatui does (ceil(line_width / viewport_width)), keeping
auto-scroll pinned to the real bottom.
Structs§
- Scroll
State - Scroll state for a scrollable text region.
Functions§
- render_
scrollable - Render
linesintoareawith visual-line-aware scrolling.