progressbar
progressbar copied to clipboard
Trailing residual characters
I occasionally see residual junk after my progress bar in situations when the total width decreases. This can happen when the description shrinks or when the timestamp wraps around (eg 1m59s
-> 2m0s
), but only when running in non-full width + ANSI code mode.
bar := progressbar.NewOptions64(10, progressbar.OptionSetDescription("lengthy"), progressbar.OptionUseANSICodes(true))
bar.Add(1)
bar.Describe("brief")
bar.Add(1)
// Output:
// brief 1% | | [0s:0s]s]
// ^^
It looks like this is a regression introduced in commit df9a997f0a and released in v3.7.3
.