-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] ProgressBar clears too many lines on update #40450
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
[Console] ProgressBar clears too many lines on update #40450
Conversation
I don't see how the test failures are related to this PR, let me know if anything else is needed |
Can you add a test to cover this bug? |
I can reproduce the bug with a small terminal window. I can confirm via a manual test that the upstream change does resolve the issue. |
f17a75b
to
159bd27
Compare
I added a unit test. You can see it failing in the test-only commit and then passing after the fix. (both commits fail the full test suite due to some unrelated issue on the 4.4 branch) |
22a4b09
to
2aa3df0
Compare
Thank you @danepowell. |
The ProgressBar incorrectly calculates line lengths when updating, including non-displayable characters such as ANSI colors. This causes it to clear too many lines if the terminal width is greater than the displayed line length but less than the line length including non-displayed characters. An example of this bug in action is https://github.com/acquia/cli/issues/467