Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions table/resizing.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
r := newResizer(t.width, t.height, t.headers, rows)
r.wrap = t.wrap
r.borderColumn = t.borderColumn
r.borderLeft = t.borderLeft
r.borderRight = t.borderRight
r.yPaddings = make([][]int, len(r.allRows))

var allRows [][]string
Expand Down Expand Up @@ -125,6 +127,8 @@

wrap bool
borderColumn bool
borderLeft bool
borderRight bool
yPaddings [][]int // vertical paddings
}

Expand Down Expand Up @@ -368,6 +372,15 @@
maxTotal += column.max + r.xPaddingForCol(j)
}
}
if r.borderLeft {
maxTotal += 1

Check failure on line 376 in table/resizing.go

View workflow job for this annotation

GitHub Actions / lint / lint (ubuntu-latest)

increment-decrement: should replace maxTotal += 1 with maxTotal++ (revive)
}
if r.borderColumn {
maxTotal += r.columnCount() - 1
}
if r.borderRight {
maxTotal += 1

Check failure on line 382 in table/resizing.go

View workflow job for this annotation

GitHub Actions / lint / lint (ubuntu-latest)

increment-decrement: should replace maxTotal += 1 with maxTotal++ (revive)
}
return
}

Expand Down
Loading