fix(tui): enforce column MaxWidth to prevent lipgloss redistribution
lipgloss table with Width(tableWidth) redistributes surplus space across all columns. Adding MaxWidth() caps each column to its computed width. Also dump any remaining surplus into the HISTORY sparkline column.
This commit is contained in:
@@ -439,6 +439,10 @@ func (m Model) computeLayout() tableLayout {
|
||||
widths[i] = w
|
||||
}
|
||||
|
||||
if surplus > 0 {
|
||||
widths[6] += surplus
|
||||
}
|
||||
|
||||
return tableLayout{
|
||||
nameW: nameW,
|
||||
sparkW: sparkW,
|
||||
|
||||
Reference in New Issue
Block a user