From 84072ffe6365ad57c4976e9272762aa6db41de7e Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 21 Jun 2026 03:46:25 -0400 Subject: feat: better score output --- internal/color/color.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/color') diff --git a/internal/color/color.go b/internal/color/color.go index 58c040c..dcbb280 100644 --- a/internal/color/color.go +++ b/internal/color/color.go @@ -6,6 +6,7 @@ import ( "regexp" "strconv" "strings" + "unicode/utf8" ) const Reset = "\033[0m" @@ -176,7 +177,7 @@ func StyleCode(name string) string { } func VisibleLen(s string) int { - return len(ansiRe.ReplaceAllString(s, "")) + return utf8.RuneCountInString(ansiRe.ReplaceAllString(s, "")) } func ContrastFg(mode string, bgIndex int) string { -- cgit v1.2.3