]> git.lyx.org Git - features.git/commitdiff
fix for #219
authorAndré Pönitz <poenitz@gmx.net>
Fri, 1 Feb 2002 12:57:16 +0000 (12:57 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 1 Feb 2002 12:57:16 +0000 (12:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3471 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C

index f9c92bbc9134d59aad96aaf51933cf1cdac9915b..966dd607959e97d47fff8395a709b806959531c9 100644 (file)
@@ -1186,7 +1186,7 @@ bool MathCursor::bruteFind(int x, int y, int xlow, int xhigh, int ylow, int yhig
 
        MathIterator it = ibegin(formula()->par().nucleus());
        MathIterator et = iend(formula()->par().nucleus());
-       for ( ; it != et; ++it) {
+       while (1) {
                // avoid invalid nesting hen selecting
                if (selection_ && !positionable(it.cursor(), Anchor_))
                        continue;
@@ -1201,7 +1201,12 @@ bool MathCursor::bruteFind(int x, int y, int xlow, int xhigh, int ylow, int yhig
                                best_cursor = it.cursor();
                        }
                }
+
+               if (it == et)
+                       break;
+               ++it;
        }
+
        if (best_dist < 1e10)
                Cursor_ = best_cursor;
        return best_dist < 1e10;