Set boundary correctly in getPosNearX

The code that looks whether neighbor block has a different direction
should look to the left or to the right depending on the direction of
the current block.

Fixes part of bug #10569
This commit is contained in:
Jean-Marc Lasgouttes 2017-04-06 15:05:19 +02:00
parent 86ae7dad3f
commit e3d252cd62

View File

@ -1140,8 +1140,10 @@ pos_type TextMetrics::getPosNearX(Row const & row, int & x,
* how boundary helps here. * how boundary helps here.
*/ */
else if (pos == cit->endpos else if (pos == cit->endpos
&& cit + 1 != row.end() && ((!cit->isRTL() && cit + 1 != row.end()
&& cit->isRTL() != (cit + 1)->isRTL()) && (cit + 1)->isRTL())
|| (cit->isRTL() && cit != row.begin()
&& !(cit - 1)->isRTL())))
boundary = true; boundary = true;
} }