create
Creates a terminal buffer with the requested visible dimensions and scrollback capacity.
The returned TerminalRenderBuffer exposes both core state and render frames. Direct embedders may copy frames while externally serializing grid reads, borrowed views, and mutations as documented by TerminalBuffer. Atomic mode snapshots retain their narrower method-level concurrency guarantees; the factory does not install a synchronization boundary.
Return
A new TerminalBuffer instance initialized with the given dimensions.
Parameters
Visible width in cells. Must be at least MIN_WIDTH.
Visible height in rows. Must be > 0.
Maximum history lines; non-negative and small enough that adding height does not exceed Int.MAX_VALUE. Zero disables retained scrollback.
Throws
if width is below MIN_WIDTH, height is non-positive, maxHistory is negative, or the retained line capacity would overflow Int.