]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
EmbeddedObjects.lyx, Math.lyx, UserGuide.lyx: Spanish translation updates by Ignacio
[lyx.git] / src / TextMetrics.cpp
index 37b779312562d260a5401e43321e166115af2a97..87459718de32baa02af5acfc25b2d6078fc38653 100644 (file)
@@ -321,15 +321,9 @@ bool TextMetrics::isRTLBoundary(pit_type pit, pos_type pos) const
        if (pos == 0)
                return false;
 
-       Paragraph const & par = text_->getPar(pit);
+       Font const & left_font = displayFont(pit, pos - 1);
 
-       bool left = displayFont(pit, pos - 1).isVisibleRightToLeft();
-       bool right;
-       if (pos == par.size())
-               right = par.isRTL(bv_->buffer().params());
-       else
-               right = displayFont(pit, pos).isVisibleRightToLeft();
-       return left != right;
+       return isRTLBoundary(pit, pos, left_font);
 }