-
Notifications
You must be signed in to change notification settings - Fork 243
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: add println and suspend implementation #351
MultiProgress: add println and suspend implementation #351
Conversation
FYI I reverted e46ca83 locally and it fixes the problem. So I guess the goal is to find a way for that commit and this feature to coexist. |
See #205 |
I tried your branch and it seems to work (I tried the multi example, and it seems to print those lines), is there something needed to reproduce the issue? I'm on linux if that matters |
@sigmaSd thanks for giving it a try! I actually did fix the issue, but forgot to mark the pull as ready for review. Sorry about that. |
@chris-laplante thanks as well! glad its not a platform issue then, If its just about adding a new line, I guess that's expected with e46ca83, I kind of want it to work that's why I'm on the lookup for issues xD |
@sigmaSd there's another problem here I didn't initially see. Adding an extra space after the last line (
So I think this pull is possibly blocked on #350. |
Yes the space hack was definitly the wrong aproach, shifting the missing width increase to the wide elements seems to be the reasonable choice in #350 |
54b87df
to
46c69af
Compare
src/draw_target.rs
Outdated
// `ProgressDrawState::draw_to_term` doesn't add \n to the last line, we need to add it | ||
// ourselves. Otherwise the last line of what we print may be overwritten on next draw. | ||
if let Some(line) = lines.last_mut() { | ||
line.push('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed after af3bd31 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this line and using #356 seems to make it work
@chris-laplante did you want to rebase this? I'd like to get the release out soon. |
Yes, absolutely. I started working on it this morning. Will finish it soon I hope. |
Awesome, thanks! |
46c69af
to
c28b574
Compare
Not ready yet, besides the lint I am still working on diagnosing an issue... |
@djc not sure if you're getting notifications about the comment I made on my commit (if you are, I apologize for the spam). In case not, I'll repeat it here since I know you want to release soon:
|
Sounds reasonable. Please do it as a separate commit (or even separate PR). |
Actually, since this doesn't change any public API, I think we can move forward with the release and add this later. I'll do another rc for a bit. |
c28b574
to
852bee7
Compare
@djc I think this is finally ready when you have a chance to take a look :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks, some minor nits remaining!
n=0 is treated as if n were 1. See https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#cursor-positioning Do the same thing as the `console` crate and don't send n=0 when we don't intend to move the cursor.
852bee7
to
d4da5ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Good to merge?
Yes please :) |
Would it be possible to get this merged in today? I'd love to play with this some more over the weekend :) |
Sorry, I somehow missed your previous comment! |
No prob, thanks for merging! |
Any chance of an rc release with these changes? |
rc.8 is out now. 👍 |
Thanks! I appreciate it :) |
Work-in-progress pull request for implementing println. This does not currently work as nothing is printed for some reason. I have reason to believe it is due to an interaction with e46ca83, since if you change the line below to
m.println("Starting...\n\n")
it works.