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
finish_with_message
method does not end message with newline
#461
Comments
To check my understanding, you are seeing this:
But you are expecting this:
Is that right? |
Yes that's correct, and now I found out that the same happens if I issue: pb.finish_with_message("Done");
println!("Test"); So to recap, if I issue: pb.finish_with_message("Done");
println!("Test"); or: pb.finish_with_message("Done");
println!();
println!("Test"); or: pb.finish_with_message("Done");
println!("\nTest"); I always get:
While to get a newline gap:
I have to issue: pb.finish_with_message("Done");
println!();
println!("\nTest"); |
OK, thanks for clarifying. I don't see any behavior out of the ordinary here, and I'd say it is working as expected. One reason why ProgressStyle::with_template("{spinner:.bold.bright.yellow} {wide_msg} More text!") ... in which case it doesn't make sense to add \n automatically. |
I agree that when the Considering this example: ProgressStyle::with_template("{spinner:.bold.bright.yellow} {wide_msg} More text!") in my opinion a new line should be added after |
I don't think we'll be able to change the semantics of |
Yeah, I don't think it makes sense to change this -- in part, because there's some asymmetry here: if we print an extra newline, there's no trivial way for you to remove it, but it's usually pretty easy for you to print an extra newline. |
Sure thing, thanks for understanding :) |
@chris-laplante thanks a lot for your support! Just for your information, another option would be to implement a new method |
I implemented the following spinner:
Then if I issue:
I do not get the expected line gap between "Done" and "Test". To make this work I need to issue:
Apparently the
finish_with_message
method does not end its message with a newline.I'm on:
The text was updated successfully, but these errors were encountered: