From fbf4b51c7b2bb4bc355dcd0ae45cfdc277f8f1d8 Mon Sep 17 00:00:00 2001 From: Alfredo Braunstein Date: Thu, 23 Aug 2007 21:00:41 +0000 Subject: [PATCH] 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 --- src/CursorSlice.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index 85db51a0d2..42c2614589 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -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; } -- 2.39.2