Prevent window height from being negative (#2232)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-10-27 20:31:00 +11:00
1 parent 7776e73334
commit b12cb33918
1 file changed
+2 -2
+2 -2
View File
@@ -630,9 +630,9 @@ func getWins(screen tcell.Screen) []*win {
for i := range wlen { for i := range wlen {
if gOpts.drawbox { if gOpts.drawbox {
wacc++ wacc++
wins = append(wins, newWin(widths[i], htot-4, wacc, 2)) wins = append(wins, newWin(widths[i], max(htot-4, 0), wacc, 2))
} else { } 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] wacc += widths[i]
} }