Expand description
Bounded, line-oriented scrollback buffer fed raw PTY chunks.
The PTY reader appends decoded chunks; this keeps the most recent
capacity complete lines plus the in-flight (unterminated) partial line.
Crucially it remembers what it had to throw away — older lines evicted
once the ring filled, and bytes clipped off a pathologically long
newline-less line — so LineRing::scrollback_notice can tell the caller
their scrollback is incomplete instead of silently handing back a truncated
view. Extracted from PtyShell so the ring logic is unit-testable without
spawning a real shell.
Structs§
- Line
Ring - A ring of complete lines plus a pending partial line, with drop accounting.