mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-31 03:56:15 +00:00
Two independent rendering glitches, both most visible over SSH and inside tmux: Startup: ratatui::try_init() enters the alternate screen but never clears it, and the first terminal.draw() only emits cells that differ from an assumed-blank internal buffer. On terminals that don't hand back a cleared alternate buffer (notably tmux, and amplified by SSH latency) the prior contents show through. Force a full repaint with terminal.clear() before the first draw. Quit: the input EventHandler spawned a detached thread that polled stdin in a loop outliving the main loop, so at quit it kept reading after raw mode was disabled and stray bytes (a keystroke or a terminal query response) echoed onto the restored screen. Give the thread a stop flag and join it before restoring the terminal; poll on a short fixed interval (decoupled from the refresh tick) so quit stays responsive. git log --oneline -1