From 5e5440f2f3c11e26084e541d45213fa62e88db99 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 6 Jun 2016 14:01:02 +0200 Subject: [PATCH] Fix right_boundary properly after a row is shortened Instead of resetting it to false, do a proper test to see whether there is a separator at the end of the row. Fixes bug #10180. --- src/TextMetrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 66e100b2d9..6690f3c86f 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -928,7 +928,7 @@ bool TextMetrics::breakRow(Row & row, int const right_margin) const // if the row is too large, try to cut at last separator. In case // of success, reset indication that the row was broken abruptly. if (row.shortenIfNeeded(body_pos, width)) - row.right_boundary(false); + row.right_boundary(!row.empty() && row.back().endpos == row.endpos()); // make sure that the RTL elements are in reverse ordering row.reverseRTL(is_rtl); -- 2.39.2