Egui::Terminal::Grid
Inherits Reference < Object
Constructors
Instance methods
Insert/delete n blank lines at row y (scroll region work —
rows below y inside the region shift down/up). Lines pushed
past the region bottom are lost; rows OUTSIDE the region stay.
Delete before insert: an insert-first shuffle would drift the
deque's tail (the visible window is its last rows lines).
Resize with canonical reflow (the gnome-terminal/alacritty
model): the buffer regroups into LOGICAL lines — a row whose
first cell carries the WRAPPED flag continues the one above —
and re-wraps each at the new width, exactly as if its text had
been PRINTED there. Idempotent from any prior fragmentation: a
shrink by one column yields full rows plus one short tail, not
1-char remainder fragments. reflow: false (the alternate
screen) keeps the plain xterm truncate/pad behavior —
full-screen apps redraw themselves on SIGWINCH. track is a
line index carried through the reflow and the scrollback-cap
trims — the caller uses it to keep the cursor on its line;
returns the updated index (or nil).
Row changes are xterm-style without reflow: growing reveals scrollback lines above the content and pads BLANK ROWS AT THE BOTTOM (content stays top-anchored — a fresh 24-row screen resized to 34 keeps its prompt on row 0); shrinking pushes the surplus top rows into the scrollback, so the bottom stays visible.
Scroll the region [top, bottom] down by n (blank lines enter
at the top of the region; the region's bottom lines are lost,
rows outside stay — delete before insert, like insert_lines).
Scroll the region [top, bottom] up by n. When history is
set and the region is the full screen, lines leaving the top
land in the scrollback (they simply stay in the deque while new
lines are appended at the bottom); otherwise they are lost.
Deque index of screen row y shown display_offset lines back.