* insertParam assumes that the cursor has the macro template in the top slice.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23351 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2008-02-29 10:02:40 +00:00
parent e59560a1fa
commit 9a56c45a7b

View File

@ -617,7 +617,13 @@ void MathMacroTemplate::edit(Cursor & cur, bool front, EntryDirection entry_from
bool MathMacroTemplate::notifyCursorLeaves(Cursor const & old, Cursor & cur)
{
commitEditChanges(cur);
// find this in cursor old
Cursor insetCur = old;
int scriptSlice = insetCur.find(this);
BOOST_ASSERT(scriptSlice != -1);
insetCur.cutOff(scriptSlice);
commitEditChanges(insetCur);
updateLook();
cur.updateFlags(Update::Force);
return InsetMathNest::notifyCursorLeaves(old, cur);