Fix table printer crashing in narrow terminals (#5449)
Co-authored-by: Mislav Marohnić <mislav@github.com>
This commit is contained in:
parent
186e5ccfb2
commit
51301f8782
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue