mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
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:
committed by
copyberry
parent
2bc43d516e
commit
cd8dc1e9b6
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user