]> git.lyx.org Git - features.git/blobdiff - src/TextMetrics.cpp
Fix at least the most immediate manifestation of bug #6454.
[features.git] / src / TextMetrics.cpp
index 80a644905334eba3fa2f5e3e6cb55276123c7525..6fca429b5aa70fade5e956741eda005297e96664 100644 (file)
@@ -328,7 +328,12 @@ bool TextMetrics::isRTLBoundary(pit_type pit, pos_type pos,
        // no RTL boundary at paragraph start
        if (pos == 0)
                return false;
-       
+
+       // if the metrics have not been calculated, then we are not
+       // on screen and can safely ignore issues about boundaries.
+       if (!contains(pit))
+               return false;
+
        ParagraphMetrics & pm = par_metrics_[pit];
        // no RTL boundary in empty paragraph
        if (pm.rows().empty())