Upstream rodaine/table state of the touched files before 9c71bfd95e

This commit is contained in:
upstream committed 2026-09-04 09:47:25 +02:00
1 parent b384e08abf
commit c86829d169
2 files changed
+2 -32

No files matched your search

+2 -5
View File
@@ -238,13 +238,10 @@ func (t *table) SetRows(rows [][]string) Table {
headerLength := len(t.header)
for _, row := range rows {
if len(row) >= headerLength {
if len(row) > headerLength {
t.rows = append(t.rows, row[:headerLength])
} else {
// pad short rows so every column is rendered, matching AddRow
padded := make([]string, headerLength)
copy(padded, row)
t.rows = append(t.rows, padded)
t.rows = append(t.rows, row)
}
}