]> git.lyx.org Git - lyx.git/blobdiff - src/CursorSlice.cpp
* gcc does not like missing characters in keywords
[lyx.git] / src / CursorSlice.cpp
index 0ff99882ec0ceedd1e8f60ca435fc562dcf2893b..3d6e8794b42fbf9b30ca2e571234bd6ead42db1f 100644 (file)
@@ -50,13 +50,7 @@ MathData & CursorSlice::cell() const
 }
 
 
-Paragraph & CursorSlice::paragraph()
-{
-       return text()->getPar(pit_);
-}
-
-
-Paragraph const & CursorSlice::paragraph() const
+Paragraph & CursorSlice::paragraph() const
 {
        return text()->getPar(pit_);
 }
@@ -108,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;
 }