From 3795bc715f1f7c054177a2c04bddb08f2eb925cf Mon Sep 17 00:00:00 2001 From: ewy Date: Sat, 6 Jun 2026 17:47:46 +0200 Subject: fix negative padding causing panic --- indexers/pikdex/meta.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indexers') diff --git a/indexers/pikdex/meta.go b/indexers/pikdex/meta.go index 3eb182f..55cad86 100644 --- a/indexers/pikdex/meta.go +++ b/indexers/pikdex/meta.go @@ -38,7 +38,9 @@ var MetaFiles = map[string]*MetaFile{ icon := string([]rune(lines[0])[:2]) desiredWidth := lipgloss.Width(icon) diff := desiredWidth - len([]rune(icon)) - icon += strings.Repeat(" ", diff) + if diff > 0 { + icon += strings.Repeat(" ", diff) + } s.Icon = icon }, Description: "icon can contain unicode symbols representing your source. It will be used in the TUI. It will be cropped to maximum two symbols and padded if shorter."}, } -- cgit v1.3.1