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.
This commit is contained in:
Jean-Marc Lasgouttes 2016-06-06 14:01:02 +02:00
parent 3f4901de9c
commit 5e5440f2f3

View 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);