Severity: MEDIUM
Status: ✅ FIXED
Files: src/main.zig
stdout was made non-blocking for backpressure handling. On exit, the
deferred display.exitAltScreen() wrote \x1b[?1049l through writeBytes,
which does not retry EAGAIN, so the sequence could be dropped and the
terminal stayed on the szn screen. Pending out_buf bytes were also freed
before the exit sequence ran.
Restore blocking mode on stdout, drain out_buf, and reorder the defers so
exitAltScreen runs before out_buf is freed. Added setBlocking.
zig build / zig build test on 0.16.0; zig build on 0.17.0.