From 56a06203bbfe6c3fc33a7b6dbd7e35e1f3905597 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Sat, 17 May 2025 09:10:43 -0700 Subject: [PATCH] fix: clear scrollable view before drawing next frame --- codex-rs/tui/src/conversation_history_widget.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codex-rs/tui/src/conversation_history_widget.rs b/codex-rs/tui/src/conversation_history_widget.rs index 3246fe7263..64fa4f6dd3 100644 --- a/codex-rs/tui/src/conversation_history_widget.rs +++ b/codex-rs/tui/src/conversation_history_widget.rs @@ -438,6 +438,8 @@ impl WidgetRef for ConversationHistoryWidget { .wrap(wrap_cfg()) .scroll((offset_into_first as u16, 0)); + // Clear the widget area to avoid visual artifacts from previous frames. + Clear.render(area, buf); paragraph.render(area, buf); // Draw scrollbar if necessary.