]> git.lyx.org Git - features.git/commitdiff
Fix right_boundary properly after a row is shortened
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Jun 2016 12:01:02 +0000 (14:01 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 9 Jun 2016 08:48:15 +0000 (10:48 +0200)
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

index 66e100b2d90202684ed5317f2cdd3eaaf24be116..6690f3c86f235b123794d4cfa129bccc41d7cd6c 100644 (file)
@@ -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);