]> git.lyx.org Git - lyx.git/blobdiff - src/text3.C
fix reading the author field.
[lyx.git] / src / text3.C
index 3900a13a111748011204fc38fd5f37d00484def6..869cda8b7bfcb87817bcd63cd30bea3fa6716976 100644 (file)
@@ -1129,25 +1129,24 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
 
                // ignore motions deeper nested than the real anchor
                LCursor & bvcur = cur.bv().cursor();
-               if (bvcur.anchor_.size() < cur.size())
-                       break;
-
-               CursorSlice old = cur.top();
-               setCursorFromCoordinates(cur, cmd.x, cmd.y);
+               if (bvcur.anchor_.hasPart(cur)) {
+                       CursorSlice old = cur.top();
+                       setCursorFromCoordinates(cur, cmd.x, cmd.y);
+
+                       // This is to allow jumping over large insets
+                       // FIXME: shouldn't be top-text-specific
+                       if (isMainText() && cur.top() == old) {
+                               if (cmd.y - bv->top_y() >= bv->workHeight())
+                                       cursorDown(cur);
+                               else if (cmd.y - bv->top_y() < 0)
+                                       cursorUp(cur);
+                       }
 
-               // This is to allow jumping over large insets
-               // FIXME: shouldn't be top-text-specific
-               if (isMainText() && cur.top() == old) {
-                       if (cmd.y - bv->top_y() >= bv->workHeight())
-                               cursorDown(cur);
-                       else if (cmd.y - bv->top_y() < 0)
-                               cursorUp(cur);
+                       // don't set anchor_
+                       bv->cursor().setCursor(cur);
+                       bv->cursor().selection() = true;
+                       lyxerr << "MOTION: " << bv->cursor() << endl;
                }
-
-               // don't set anchor_
-               bv->cursor().setCursor(cur);
-               bv->cursor().selection() = true;
-               lyxerr << "MOTION: " << bv->cursor() << endl;
                break;
        }