10000 Add failing test for messages containing new lines. by grasmash · Pull Request #40476 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add failing test for messages containing new lines. #40476

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

Closed
wants to merge 3 commits into from

Conversation

grasmash
Copy link
Contributor
@grasmash grasmash commented Mar 15, 2021
Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

See #40460

When a multiline message is added to a progress bar, the progress bar measures the length of all lines combined in a single string without considering whether that string contains new line characters. It is not accurately measuring the number of lines that are displayed on the terminal.

On the terminal, the actual number of new lines is dictated by a combination of new line characters and text extending beyond the terminal width. Due to this bug, the progress bar sometimes clears too many lines when the progress bar is advanced.

The progress bar should instead consider the overlap of $this->formatLineCount and the actual number of lines in the message and then add any remainder.

@grasmash grasmash requested a review from chalasr as a code owner March 15, 2021 16:34
@carsonbot carsonbot added this to the 4.4 milestone Mar 15, 2021
@grasmash grasmash closed this Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0