notifyCursorLeaves may have killed the inset and put its contents
at lower level (bug 2908)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16430
a592a061-630c-0410-9148-
cb99ea01b6c8
{
BOOST_ASSERT(!empty());
//lyxerr << "Leaving inset to the right" << endl;
{
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();
inset().notifyCursorLeaves(*this);
if (depth() == 1)
return false;
pop();
+ pos() += lastpos() - lp + 1;