http://bugzilla.lyx.org/show_bug.cgi?id=3407
* InsetMathNest.cpp (doDispatch/LFUN_MATH_MODE): handle undo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26173
a592a061-630c-0410-9148-
cb99ea01b6c8
// ignore math-mode on when already in math mode
if (currentMode() == Inset::MATH_MODE && cmd.argument() == "on")
break;
+ cur.recordUndoSelection();
cur.macroModeClose();
docstring const save_selection = grabAndEraseSelection(cur);
selClearOrDel(cur);
cur.niceInsert(save_selection);
#else
if (currentMode() == Inset::TEXT_MODE) {
+ cur.recordUndoSelection();
cur.niceInsert(MathAtom(new InsetMathHull("simple")));
cur.message(_("create new math text environment ($...$)"));
} else {