diff --git a/src/cursor.C b/src/cursor.C index 5bccc4d13b..3146935b47 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -374,11 +374,12 @@ bool LCursor::popRight() { BOOST_ASSERT(!empty()); //lyxerr << "Leaving inset to the right" << endl; + const pos_type lp = (depth() > 1) ? (*this)[depth() - 2].lastpos() : 0; inset().notifyCursorLeaves(*this); if (depth() == 1) return false; pop(); - ++pos(); + pos() += lastpos() - lp + 1; return true; }