Modify layout fix bug in how long text without space is cut #7999
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims at answering the following issue: #7998
As explained in the issue, the function
layout_text
cuts a line at the wrong place in certain cases. Upon reading the code source for this function, I came to the conclusion that it's probably caused by the fact that the value of the variableis_space
is not reset to 0 at each iteration over the lines. I think so because:is_space
but then not set this starting value again for each line leading to a situation in which lines can influence each other's layoutHowever, there's a lot I do not understand in this file, so maybe there's just something I don't get
Maintainer merge checklist
Component: xxx
label.api-deprecation
orapi-break
label.release-highlight
label to be highlighted in release notes.versionadded
,versionchanged
as needed.