File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ func (m *Model) FromValues(value, separator string) {
346346}
347347
348348func (m Model ) headersView () string {
349- var s = make ([]string , len (m .cols ))
349+ var s = make ([]string , 0 , len (m .cols ))
350350 for _ , col := range m .cols {
351351 style := lipgloss .NewStyle ().Width (col .Width ).MaxWidth (col .Width ).Inline (true )
352352 renderedCell := style .Render (runewidth .Truncate (col .Title , col .Width , "…" ))
@@ -356,7 +356,7 @@ func (m Model) headersView() string {
356356}
357357
358358func (m * Model ) renderRow (rowID int ) string {
359- var s = make ([]string , len (m .cols ))
359+ var s = make ([]string , 0 , len (m .cols ))
360360 for i , value := range m .rows [rowID ] {
361361 style := lipgloss .NewStyle ().Width (m .cols [i ].Width ).MaxWidth (m .cols [i ].Width ).Inline (true )
362362 renderedCell := m .styles .Cell .Render (style .Render (runewidth .Truncate (value , m .cols [i ].Width , "…" )))
You can’t perform that action at this time.
0 commit comments