Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing residual characters #124

Open
NathanBaulch opened this issue Jul 25, 2022 · 1 comment
Open

Trailing residual characters #124

NathanBaulch opened this issue Jul 25, 2022 · 1 comment

Comments

@NathanBaulch
Copy link
Contributor

NathanBaulch commented Jul 25, 2022

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.

@schollz
Copy link
Owner

schollz commented May 20, 2024

would accept PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants