TerminalReader
Zero-allocation read contract for the terminal buffer.
Exposes viewport-relative state plus random-access helpers for the currently active screen buffer. Out-of-bounds probes never throw; they return stable sentinel values so renderers can remain branch-light. Serialize reads with terminal mutations; returned TerminalLine views borrow live storage and must not escape that serialization.
Inheritors
Properties
Number of retained off-screen history lines in the active buffer.
Actual active screen. Read synchronously under the same serialization as terminal mutations.
Current immutable effective palette, including application color overrides. Reading retains the existing object without allocating or reading a render frame. Synchronize with terminal mutations before reading; a retained palette remains safe to use after releasing that synchronization.
Active xterm window title.