diff --git a/decor/decorator.go b/decor/decorator.go index a10bc44..52588c0 100644 --- a/decor/decorator.go +++ b/decor/decorator.go @@ -135,9 +135,9 @@ if (wc.C & DextraSpace) != 0 { max++ } - return fmt.Sprintf(fmt.Sprintf(wc.dynFormat, max), msg) + } else { + max = (utf8.RuneCountInString(msg) - max) + wc.W } - max = (utf8.RuneCountInString(msg) - max) + wc.W return fmt.Sprintf(fmt.Sprintf(wc.dynFormat, max), msg) }