Skip to main content

inline_viewport_needs_resync

Function inline_viewport_needs_resync 

Source
pub fn inline_viewport_needs_resync(
    terminal_height: u16,
    current_viewport_height: u16,
) -> bool
Expand description

Whether the inline viewport no longer matches the window it was created for.

Ratatui keeps the height an inline viewport was created with: it clamps that height to a window that shrank but never grows it back, so a stale viewport both wastes rows after a shrink and swallows the rows this UI commits its scrollback through after a regrow. Only a rebuilt terminal puts the two back in step.