From: Stefan Schimanski Date: Fri, 29 Feb 2008 10:02:40 +0000 (+0000) Subject: * insertParam assumes that the cursor has the macro template in the top slice. X-Git-Tag: 1.6.10~5979 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9a56c45a7b409bf105fc949d6e3f9d641dc0d605;p=features.git * 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 --- diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index fd0a5874bb..f439d1fc3b 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -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);