未验证 提交 3d87b271 编写于 作者: J Jason Simmons 提交者: GitHub

libtxt: fix bug in calculating line end positions excluding whitespace (#5459)

Fixes https://github.com/flutter/flutter/issues/18014
上级 44863aa4
......@@ -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--;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册