]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
Coding style
[lyx.git] / src / mathed / InsetMathNest.cpp
index 2d8a7cc61ac85105c4f0b49019e9b0edd91433aa..c9fdc1abc6e9e7574bcf329c969b4a91d9dc587b 100644 (file)
@@ -929,6 +929,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                // 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);
@@ -939,6 +940,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                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 {
@@ -1834,6 +1836,7 @@ MathCompletionList::MathCompletionList(Cursor const & cur)
        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"));