Scroll operations for ScreenBuffer: region management and scroll up/down.
Summary
Functions
Scrolls the buffer content down by the specified number of lines within the scroll region.
Scrolls down within an explicit top/bottom region.
Scrolls the buffer content up by the specified number of lines within the scroll region. Returns {buffer, scrolled_lines}.
Scrolls up within an explicit top/bottom region.
Functions
Scrolls the buffer content down by the specified number of lines within the scroll region.
Scrolls down within an explicit top/bottom region.
Scrolls the buffer content up by the specified number of lines within the scroll region. Returns {buffer, scrolled_lines}.
Scrolls up within an explicit top/bottom region.
Returns {buffer, scrolled_out_rows} -- the rows evicted from the top of
the region, oldest-first -- mirroring scroll_up/2's two-arg contract.
Whether scrolled_out_rows is scrollback-eligible depends on the region:
callers feeding an effective top of 0 (screen row 1, including the
no-region/full-screen case) should treat them as real scrollback history;
callers with an interior region (top > 0) discard them, matching
real-terminal behavior where only a top-anchored scroll region feeds
native scrollback.