From: Jean-Marc Lasgouttes Date: Mon, 6 Jun 2016 12:01:02 +0000 (+0200) Subject: Fix right_boundary properly after a row is shortened X-Git-Tag: 2.3.0alpha1~1544 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5e5440f2f3c11e26084e541d45213fa62e88db99;p=features.git 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. --- 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);