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
This commit is contained in:
Benjamin Carlsson
2026-08-16 22:53:19 +00:00
committed by copyberry
parent 2bc43d516e
commit cd8dc1e9b6

View File

@@ -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() {