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
fix and rename real_len
#608
Conversation
Thanks for working on this! Can we share the code with If we're going to move this I'd like to see two separate commits, one that moves/renames the code and one that changes the algorithm. Ideally tests that work with the old algorithm are introduced before this, and then the fixing commit adds tests that didn't work previously -- this will make it easy for me to review. (Please squash linting changes etc.) |
Doesn't seem like a worthwhile change seeing as that is counting lines while drawing, while this does it ahead of time.
Please see new commits -- first commit moves + add working tests, second commit adds the failing tests, third commit fixes the failing tests. |
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.
Thanks, that is better. A few nits to address...
CI seems like a flake, can't repro at all locally. |
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.
Yup, the CI failures seemed to go away on rerunning. This is looking great, thanks!
Fixes #606 -- see added test cases. This logic matches what happens
draw_target.rs
as well. It'll now also correctly handle lines with only ANSI codes.indicatif/src/draw_target.rs
Lines 505 to 518 in 81aa4c6