diff --git a/decor/decorator.go b/decor/decorator.go index 4834286..2271cbb 100644 --- a/decor/decorator.go +++ b/decor/decorator.go @@ -132,11 +132,11 @@ runeCount := utf8.RuneCountInString(stripansi.Strip(msg)) ansiCount := utf8.RuneCountInString(msg) - runeCount if (wc.C & DSyncWidth) != 0 { + if (wc.C & DextraSpace) != 0 { + runeCount++ + } wc.wsync <- runeCount max := <-wc.wsync - if (wc.C & DextraSpace) != 0 { - max++ - } format = fmt.Sprintf(wc.dynFormat, ansiCount+max) } else { format = fmt.Sprintf(wc.dynFormat, ansiCount+wc.W)