summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indexers/pikdex/meta.go4
1 files changed, 3 insertions, 1 deletions
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."},
}