-
Notifications
You must be signed in to change notification settings - Fork 245
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
Handle terminal line wrap to avoid new line #533
Conversation
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.
Seems like a nice improvement to me! @chris-laplante what do you think?
Would be nice to have some tests for this.
Makes sense to me too! I agree some tests would be nice. @RDruon are you able to implement a render test or two for this? |
I added 2 render tests, one with |
@chris-laplante could I get another review? It seems several projects are interested in this change. |
I think this is looking good, thanks! @chris-laplante feel free to follow-up if you have more thoughts. |
Sorry for the delay! Looks good to me as well |
Release notes: - Avoid extra newlines in narrow terminals by bumping the `indicatif` dependency to v0.17.4. - This pulls in the fix for console-rs/indicatif#533 - console-rs/indicatif#520 is still an issue if the terminal only has space for ≈lines
Terminal usually wrap line in case it can't fit the current terminal width.
This behavior is not taken in account by indicatif and create some visual artifacts.
The issue was reported as #144 (closed with a workaround) and #520.
Please find below a demo without the patch:
Demo with the patch:
Using #144 example: