mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Avoid querying terminal size on every TUI redraw (#36482)
## What changed - Carry dimensions on resize events and reuse the cached screen size for ordinary draws. - Refresh terminal geometry after resize settling, process resume, and external program execution. - Pass the resolved size through transcript reflow, viewport updates, and standalone TUI screens so each frame uses consistent dimensions. ## Testing - Cover cached draws, resize-driven rendering, settled-size rechecks, resume refreshes, and alternate-screen size updates. GitOrigin-RevId: 9d83dbab50d7a038bd59b4c66c13abcac69ddc79
This commit is contained in:
1 parent
ee0247f95a
commit
7dc1856685
21 files changed
+398
-97
No files matched your search
@@ -341,8 +341,10 @@ impl App {
|
||||
/// source of truth for the active cell and its cache invalidation key, and because `App` owns
|
||||
/// overlay lifecycle and frame scheduling for animations.
|
||||
fn overlay_forward_event(&mut self, tui: &mut tui::Tui, event: TuiEvent) -> Result<()> {
|
||||
if matches!(&event, TuiEvent::Draw | TuiEvent::Resize)
|
||||
&& let Some(Overlay::Transcript(t)) = &mut self.overlay
|
||||
if matches!(
|
||||
&event,
|
||||
TuiEvent::Draw | TuiEvent::Resume | TuiEvent::Resize(_)
|
||||
) && let Some(Overlay::Transcript(t)) = &mut self.overlay
|
||||
{
|
||||
let active_key = self.chat_widget.active_cell_transcript_key();
|
||||
let chat_widget = &self.chat_widget;
|
||||
|
||||
Reference in new issue
Block a user