From cd8dc1e9b6dd24d335f4fcb26546f36d045fd59a Mon Sep 17 00:00:00 2001 From: Benjamin Carlsson Date: Sun, 16 Aug 2026 22:53:19 +0000 Subject: [PATCH] Stop rendering columns after filling their area (#38913) ## What changed Stop visiting remaining `ColumnRenderable` children once the render position reaches the bottom of the available area. GitOrigin-RevId: 5b7f2c657f65879119b1b840e82f47b1c5f9e3db --- codex-rs/tui/src/render/renderable.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex-rs/tui/src/render/renderable.rs b/codex-rs/tui/src/render/renderable.rs index 72cc3b34e8..a35d0de2b2 100644 --- a/codex-rs/tui/src/render/renderable.rs +++ b/codex-rs/tui/src/render/renderable.rs @@ -177,6 +177,9 @@ impl Renderable for ColumnRenderable<'_> { fn render(&self, area: Rect, buf: &mut Buffer) { let mut y = area.y; for child in &self.children { + if y >= area.bottom() { + break; + } let child_area = Rect::new(area.x, y, area.width, child.desired_height(area.width)) .intersection(area); if !child_area.is_empty() {