allow one past-the-end position in CursorSlice, as it eases iteration

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19760 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Alfredo Braunstein 2007-08-23 21:00:41 +00:00
parent c0d2633b8c
commit fbf4b51c7b

View 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;
}