fix border minimum area

This commit is contained in:
🪞👃🪞 2024-09-30 07:04:05 +03:00
parent fd2e8f83f6
commit 7df9cc930d

View file

@ -443,7 +443,7 @@ impl<S: BorderStyle> Widget for Border<S> {
}
fn render (&self, to: &mut TuiOutput) -> Usually<()> {
let area = to.area();
if area.w() > 2 && area.y() > 2 {
if area.w() > 0 && area.y() > 0 {
to.blit(&self.0.nw(), area.x(), area.y(), self.0.style());
to.blit(&self.0.ne(), area.x() + area.w() - 1, area.y(), self.0.style());
to.blit(&self.0.sw(), area.x(), area.y() + area.h() - 1, self.0.style());