Fix table printer crashing in narrow terminals (#5449)

Co-authored-by: Mislav Marohnić <mislav@github.com>
This commit is contained in:
Roshan Padaki 2022-04-13 10:57:41 -04:00 committed by GitHub
parent 186e5ccfb2
commit 51301f8782
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,7 +204,7 @@ func (t *ttyTablePrinter) calculateColumnWidths(delimSize int) []int {
}
if max := maxColWidths[col]; max < perColumn {
colWidths[col] = max
} else {
} else if perColumn > 0 {
colWidths[col] = perColumn
}
}