fix(tui): reduce full-repaint flicker

Avoid an intermediate flush between terminal origin reset and clear so slow terminals do not render the transient reset state.
This commit is contained in:
jieshu666
2026-05-14 20:04:50 +08:00
committed by GitHub
parent 4a617b1b2c
commit 96369a8d51
-2
View File
@@ -5500,7 +5500,6 @@ fn draw_app_frame_inner(
let result = (|| -> Result<()> {
if full_repaint {
terminal.backend_mut().write_all(TERMINAL_ORIGIN_RESET)?;
terminal.backend_mut().flush()?;
terminal.clear()?;
}
terminal.draw(|f| render(f, app))?;
@@ -6308,7 +6307,6 @@ fn reset_terminal_viewport(terminal: &mut AppTerminal, sync_output_enabled: bool
let result = (|| -> Result<()> {
terminal.backend_mut().write_all(TERMINAL_ORIGIN_RESET)?;
terminal.backend_mut().flush()?;
terminal.clear()?;
Ok(())
})();