1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-24 13:48:56 +08:00

Minor code reduction.

This commit is contained in:
Oliver 2018-03-05 14:18:04 +01:00
parent 8cb36ea743
commit ccd80aa4fc

View File

@ -618,11 +618,10 @@ ColumnLoop:
// If we have space left, distribute it.
if tableWidth < width {
toDistribute := width - tableWidth
for index := range widths {
for index, expansion := range expansions {
if expansionTotal <= 0 {
break
}
expansion := expansions[index]
expWidth := toDistribute * expansion / expansionTotal
widths[index] += expWidth
tableWidth += expWidth