File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ func (m *Model) FromValues(value, separator string) {
346
346
}
347
347
348
348
func (m Model ) headersView () string {
349
- var s = make ([]string , len (m .cols ))
349
+ var s = make ([]string , 0 , len (m .cols ))
350
350
for _ , col := range m .cols {
351
351
style := lipgloss .NewStyle ().Width (col .Width ).MaxWidth (col .Width ).Inline (true )
352
352
renderedCell := style .Render (runewidth .Truncate (col .Title , col .Width , "…" ))
@@ -356,7 +356,7 @@ func (m Model) headersView() string {
356
356
}
357
357
358
358
func (m * Model ) renderRow (rowID int ) string {
359
- var s = make ([]string , len (m .cols ))
359
+ var s = make ([]string , 0 , len (m .cols ))
360
360
for i , value := range m .rows [rowID ] {
361
361
style := lipgloss .NewStyle ().Width (m .cols [i ].Width ).MaxWidth (m .cols [i ].Width ).Inline (true )
362
362
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