Files
codex/codex-rs
Eric Traut a9d7206f8f Batch terminal writes when inserting TUI history (#64204)
## Why

Line-buffered stdout can flush on every newline during a long history
replay, turning a batch of history rows into many small terminal writes.

## What changed

Use a bounded buffer to group history writes in both standard and
full-screen modes. Drain the buffer to the terminal backend without
explicitly flushing stdout.

## Testing

Add a regression test that inserts 500 rows in each mode and checks that
fewer than 50 backend writes contain newlines, the final row appears
directly above the viewport, and the cursor returns to its original position.

GitOrigin-RevId: c33a13fc71307a3f71be5e266e04c0160c34a8b3
2026-11-26 19:35:46 +00:00
..
…
…
…