-
Notifications
You must be signed in to change notification settings - Fork 250
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
Empty lines in MultiProgress::println
leads to lost output
#606
Comments
MultiProgressBar::println
leads to lost outputMultiProgress::println
leads to lost output
MultiProgress::println
leads to lost outputMultiProgress::println
leads to lost output
I think my fix is maybe a bit too simplistic on the other edge now that I think about it, but if the location feels right I can do a robust solution with some proper tests. |
I don't remember all the context here, but it looks to me like |
As far as I can tell, it is the "sum of wrapped line count", i.e., number of lines once wrapping is applied. |
I don't have this stored in my head anymore unfortunately :/. I will try to take some time over the coming holiday weeks to look at it. |
Associated repro repo: https://github.com/tgolsson/indicatif-repro. It expects the indicatif repo to be checked out adjacently.
I'm debugging this issue in Pantsbuild: pantsbuild/pants#20171, and have isolated a reproduction for a bad print related to multiple repeated
\n
. On line 225 in that repository, there's a\n\n
before the final line. That leads to losing the final line. If it's a single\n
, the last line is printed. As far as I can tell while playing around with that message; each time\n\n
is seen we lose one line of output from the end. So\n\n
seen three times means we lose three lines from the end, and so on.I'm 95% confident that the error exists here:
indicatif/src/multi.rs
Lines 278 to 282 in f33789e
As that will count "zero-width" lines as being no line at all. Indeed, changing that to floor + 1 fixes the issue. It also fixes the issue for single progress bars (that are part of multiprogress), which I guess is because they share state somehow? You can play around with it on my repo by printing to
pb
instead of multiprogress, again on line 225.The text was updated successfully, but these errors were encountered: