libtxt: fix bug in calculating line end positions excluding whitespace (flutter/engine#5459)
Fixes https://github.com/flutter/flutter/issues/18014
This commit is contained in:
@@ -303,7 +303,7 @@ bool Paragraph::ComputeLineBreaks() {
|
||||
(hard_break && line_end < text_.size()) ? line_end + 1 : line_end;
|
||||
size_t line_end_excluding_whitespace = line_end;
|
||||
while (
|
||||
line_end_excluding_whitespace > 0 &&
|
||||
line_end_excluding_whitespace > line_start &&
|
||||
minikin::isLineEndSpace(text_[line_end_excluding_whitespace - 1])) {
|
||||
line_end_excluding_whitespace--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user