Codebase list golang-github-vbauerster-mpb / 16a6e3f
sync with extra space if any Vladimir Bauer 6 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
131131 runeCount := utf8.RuneCountInString(stripansi.Strip(msg))
132132 ansiCount := utf8.RuneCountInString(msg) - runeCount
133133 if (wc.C & DSyncWidth) != 0 {
134 if (wc.C & DextraSpace) != 0 {
135 runeCount++
136 }
134137 wc.wsync <- runeCount
135138 max := <-wc.wsync
136 if (wc.C & DextraSpace) != 0 {
137 max++
138 }
139139 format = fmt.Sprintf(wc.dynFormat, ansiCount+max)
140140 } else {
141141 format = fmt.Sprintf(wc.dynFormat, ansiCount+wc.W)