KetraTerm
API · v0.2.2All versions

resizeViewport

fun resizeViewport(columns: Int, rows: Int, oldScrollbackOffset: Int = 0): TerminalViewportResizeResult

Resizes the terminal and captures its viewport anchor and history baseline under the same mutation lock before notifying the connector.

Reflow may replace history storage and change its discarded-row counter. Consumers that retain scrollback position must adopt the complete result together, so later output is measured against the resized history.

Return

the resized viewport and history metadata from one synchronized state.

Parameters

columns

target terminal column width; must be positive.

rows

target terminal row height; must be positive.

oldScrollbackOffset

pre-resize whole-row offset, or zero for live output.