// 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 {
globals.push_back(from_ascii("\\alignedat"));
globals.push_back(from_ascii("\\cases"));
globals.push_back(from_ascii("\\substack"));
+ globals.push_back(from_ascii("\\xymatrix"));
globals.push_back(from_ascii("\\subarray"));
globals.push_back(from_ascii("\\array"));
globals.push_back(from_ascii("\\sqrt"));