]> git.lyx.org Git - features.git/commitdiff
Fix at least the most immediate manifestation of bug #6454.
authorRichard Heck <rgheck@comcast.net>
Fri, 19 Mar 2010 01:43:53 +0000 (01:43 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 19 Mar 2010 01:43:53 +0000 (01:43 +0000)
Investigation of this bug revealed that we are blinking the cursor even
when it is not visible. This should also be reverted. It may, in a way,
be that bug that caused this one, but this check is worth doing anyway.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33797 a592a061-630c-0410-9148-cb99ea01b6c8

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())