From b12cb33918bb54cf8fcf2c95cf05c58c0981edff Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Mon, 27 Oct 2025 20:31:00 +1100 Subject: [PATCH] Prevent window height from being negative (#2232) --- ui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui.go b/ui.go index 77a62c48..e7de9e26 100644 --- a/ui.go +++ b/ui.go @@ -630,9 +630,9 @@ func getWins(screen tcell.Screen) []*win { for i := range wlen { if gOpts.drawbox { wacc++ - wins = append(wins, newWin(widths[i], htot-4, wacc, 2)) + wins = append(wins, newWin(widths[i], max(htot-4, 0), wacc, 2)) } else { - wins = append(wins, newWin(widths[i], htot-2, wacc, 1)) + wins = append(wins, newWin(widths[i], max(htot-2, 0), wacc, 1)) } wacc += widths[i] }