From a9f9a2e38db5ce5f87de44c89f57da512e3020b5 Mon Sep 17 00:00:00 2001 From: milarin Date: Mon, 24 Apr 2023 13:03:16 +0200 Subject: [PATCH] fixed size calculation in BorderView --- views/view_border.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/view_border.go b/views/view_border.go index 7c6d8c9..28f75f9 100644 --- a/views/view_border.go +++ b/views/view_border.go @@ -101,9 +101,9 @@ func (v *BorderView) Layout() (prefWidth, prefHeight int) { for side, border := range v.ShowBorder { if border { - if side.Horizontal() { + if side.Horizontal() && w >= 0 { w++ - } else if side.Vertical() { + } else if side.Vertical() && h >= 0 { h++ } }