fix(tui/render): resync buffers after WouldBlock

This commit is contained in:
James Peter
2026-01-10 09:12:39 +10:00
parent c82e471f62
commit 7ef6a6c46b
+6
View File
@@ -268,6 +268,12 @@ impl App<'_> {
// subsequent diff-based draws may not fully repair stale tail lines.
// Force a clear on the next successful frame to resynchronize.
self.clear_on_first_frame = true;
// Also force the next successful draw to repaint the entire screen by
// invalidating ratatui's notion of the "current" buffer. This avoids
// cases where a partially-applied frame leaves stale glyphs visible but
// the back buffer thinks the terminal is already up to date.
terminal.swap_buffers();
// Non‑blocking draw hit backpressure; try again shortly.
if used_nonblocking {
tracing::debug!("nonblocking redraw hit WouldBlock; rescheduling");