]> git.lyx.org Git - lyx.git/blobdiff - src/CursorSlice.cpp
adjust
[lyx.git] / src / CursorSlice.cpp
index 85db51a0d278d3746699d0b0dbc2b3624c180ef5..3d6e8794b42fbf9b30ca2e571234bd6ead42db1f 100644 (file)
@@ -102,15 +102,24 @@ void CursorSlice::forwardPos()
                return;
        }
 
-       // otherwise try to move on one cell if possible
-       if (idx() < lastidx()) {
-               //lyxerr << "... next idx" << endl;
-               ++idx();
-               pit() = 0;
-               pos() = 0;
-               return;
-       }
-       BOOST_ASSERT(false);
+       // otherwise move on one cell
+       //lyxerr << "... next idx" << endl;
+
+       BOOST_ASSERT(idx() < nargs());
+
+       ++idx();
+       pit() = 0;
+       pos() = 0;
+}
+
+
+void CursorSlice::forwardIdx()
+{
+       BOOST_ASSERT(idx() < nargs());
+
+       ++idx();
+       pit() = 0;
+       pos() = 0;
 }