diff --git a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc index e8a83b96d2..7c1ab261eb 100644 --- a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc +++ b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc @@ -561,7 +561,8 @@ void Paragraph::Layout(double width, bool force) { // let it impact metrics. After layout of the whitespace run, we do not // add its width into the x-offset adjustment, effectively nullifying its // impact on the layout. - if (line_range.end_excluding_whitespace < line_range.end && + if (paragraph_style_.ellipsis.empty() && + line_range.end_excluding_whitespace < line_range.end && bidi_run.start() <= line_range.end && bidi_run.end() > line_end_index) { line_runs.emplace_back(std::max(bidi_run.start(), line_end_index), diff --git a/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc b/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc index 622bca0b0f..52781a70f7 100644 --- a/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc +++ b/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc @@ -2496,7 +2496,7 @@ TEST_F(ParagraphTest, Ellipsize) { // Check that the ellipsizer limited the text to one line and did not wrap // to a second line. - ASSERT_EQ(paragraph->records_.size(), 2ull); + ASSERT_EQ(paragraph->records_.size(), 1ull); } // Test for shifting when identical runs of text are built as multiple runs.