Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

feat(tui2): coalesce transcript scroll redraws (#8295)

Josh McKinney1d4463ba8137
diff --git a/codex-rs/tui2/src/app.rs b/codex-rs/tui2/src/app.rs
index a241cc879b..0d4ea815ed 100644
--- a/codex-rs/tui2/src/app.rs
+++ b/codex-rs/tui2/src/app.rs
@@ -953,7 +953,9 @@ impl App {
self.transcript_scroll
.scrolled_by(delta_lines, &line_meta, visible_lines);
- tui.frame_requester().schedule_frame();
+ // Delay redraws slightly so scroll bursts coalesce into a single frame.
+ tui.frame_requester()
+ .schedule_frame_in(Duration::from_millis(16));
}
/// Convert a `ToBottom` (auto-follow) scroll state into a fixed anchor at the current view.