summaryrefslogtreecommitdiffstats
path: root/pkg/utils/formatting.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/utils/formatting.go')
-rw-r--r--pkg/utils/formatting.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/utils/formatting.go b/pkg/utils/formatting.go
index 139946ddb..a6bbc5670 100644
--- a/pkg/utils/formatting.go
+++ b/pkg/utils/formatting.go
@@ -161,10 +161,10 @@ func MaxFn[T any](items []T, fn func(T) int) int {
// TruncateWithEllipsis returns a string, truncated to a certain length, with an ellipsis
func TruncateWithEllipsis(str string, limit int) string {
- if runewidth.StringWidth(str) > limit && limit <= 3 {
+ if runewidth.StringWidth(str) > limit && limit <= 2 {
return strings.Repeat(".", limit)
}
- return runewidth.Truncate(str, limit, "...")
+ return runewidth.Truncate(str, limit, "…")
}
func SafeTruncate(str string, limit int) string {