fix: prevent calender render panic when terminal height is small (#1380)

Fixes: #1379
This commit is contained in:
Anthony Rodgers 2024-09-19 14:02:26 +01:00 committed by GitHub
parent 9875d9facc
commit b9653ba05a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,7 +177,9 @@ impl<DS: DateStyler> Monthly<'_, DS> {
spans.push(self.format_date(curr_day));
curr_day += Duration::DAY;
}
if buf.area.height > y {
buf.set_line(days_area.x, y, &spans.into(), area.width);
}
y += 1;
}
}