]> git.lyx.org Git - lyx.git/commitdiff
allow one past-the-end position in CursorSlice, as it eases iteration
authorAlfredo Braunstein <abraunst@lyx.org>
Thu, 23 Aug 2007 21:00:41 +0000 (21:00 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Thu, 23 Aug 2007 21:00:41 +0000 (21:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19760 a592a061-630c-0410-9148-cb99ea01b6c8

src/CursorSlice.cpp

index 85db51a0d278d3746699d0b0dbc2b3624c180ef5..42c26145898231c242cb0340551fc0a7dff543ae 100644 (file)
@@ -102,15 +102,11 @@ 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;
+       ++idx();
+       pit() = 0;
+       pos() = 0;
 }