-
Notifications
You must be signed in to change notification settings - Fork 184
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
The last line of text printed by the program disappears if it doesn't end with a newline #216
Comments
I will try to see how other libraries behave in this case. |
On unix, |
Ok, |
Could you please give PR #224 a try ? |
It is the exact same output, the last word ( |
On Windows ? I need time or your help to find why the PR does not work. - println!("Line: {}", line);
+ print!("Line: {}\nbim", line); |
Tested on linux, the I am not well versed in
|
Sorry, the syntax is 'pkg=level' (not 'pkg:level')... RUST_LOG=rustyline=debug cargo run --example example 2> debug.log For example:
Thanks for your help. |
Here it is:
One observation is that "bim" appears and then quickly disappears, replaced by the prompt. |
You are right! |
Excellent, it works! Thank you! |
Last minute update: changed the example to this: print!("Line: {}", line); Basically, eliminated the "bim" text. Now, the text gets shown on the screen only if it has at most 2 characters. |
It also shows if the input has at least 13 characters. Also, if the line doesn't end with a newline (like in the example), it appears on its own line, unlike the expected example I gave in the issue where the text just appears on the left of the prompt. So, instead of
The result is this (considering that the fix works for inputs between 3 and 12 characters):
|
Logs suggest that there is something wrong with |
Silly me... |
Could you give another try to this ? |
Works! |
Sample program:
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: