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

MultiProgress example indentation prefixes are sometimes not drawn #412

Closed
djc opened this issue Mar 21, 2022 · 3 comments · Fixed by #414
Closed

MultiProgress example indentation prefixes are sometimes not drawn #412

djc opened this issue Mar 21, 2022 · 3 comments · Fixed by #414

Comments

@djc
Copy link
Member

djc commented Mar 21, 2022

When running cargo run --example multi-tree-ext, the indentation sometimes goes missing.

Expected output:

[32/32]   ✔ the
[32/32]     ✔ quick
[32/32]       ✔ brown
[32/32]         ✔ fox
[32/32]           ✔ jumps
[32/32]             ✔ over
[32/32]               ✔ a
[32/32]                 ✔ lazy
[32/32]                   ✔ dog
████████████████████████████████████████  585/585

Actual output:

[32/32] ✔ the
[32/32] ✔ quick
[32/32] ✔ brown
[32/32] ✔ fox
[32/32] ✔ jumps
[32/32] ✔ over
[32/32] ✔ a
[32/32] ✔ lazy
[32/32] ✔ dog
████████████████████████████████████████  585/585

Bisection points to 1d37660 as being the cause, which makes sense because it touches the prefix -- on the other hand, it's still unclear me to how those fairly straightforward changes could cause this.

@djc
Copy link
Member Author

djc commented Mar 21, 2022

Here it seems something is different when drawing after the progress bar is finished, since the prefix seems to be correct before the progress bar is finished.

@djc djc mentioned this issue Mar 21, 2022
@djc
Copy link
Member Author

djc commented Mar 21, 2022

It turns out that although #395 made sure that message and prefix are carried over even if the style is overwritten, that only fixed ProgressBar::with_style() and not ProgressBar::set_style(), which is used in this example. Thus, this issue is fixed in #414 by making those methods share the same logic from #395.

@chris-laplante
Copy link
Collaborator

Good catch

@djc djc closed this as completed in #414 Mar 21, 2022
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

Successfully merging a pull request may close this issue.

2 participants