]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
Fix bug #6936.
[lyx.git] / src / mathed / InsetMathNest.cpp
index f4dc71c2b1d96f66140d7d642e8641b77092dd55..c2f4fc16ba5deabdc0e1a9ae2d4e610c038e0927 100644 (file)
@@ -872,7 +872,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                // if relevant. Think typing "\frac<space>".
                if (cmd.argument()[0] == ' '
                    && cur.inMacroMode() && cur.macroName() != "\\"
-                   && cur.macroModeClose()) {
+                   && cur.macroModeClose() && cur.pos() > 0) {
                        MathAtom const atom = cur.prevAtom();
                        if (atom->asNestInset() && atom->isActive()) {
                                cur.posBackward();
@@ -1368,7 +1368,6 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
        // we just need to be in math mode to enable that
        case LFUN_MATH_SIZE:
        case LFUN_MATH_SPACE:
-       case LFUN_MATH_LIMITS:
        case LFUN_MATH_EXTERN:
                flag.setEnabled(true);
                break;
@@ -2128,6 +2127,10 @@ MathCompletionList::MathCompletionList(Cursor const & cur)
        globals.push_back(from_ascii("\\hphantom"));
        globals.push_back(from_ascii("\\phantom"));
        globals.push_back(from_ascii("\\vphantom"));
+       globals.push_back(from_ascii("\\cancel"));
+       globals.push_back(from_ascii("\\bcancel"));
+       globals.push_back(from_ascii("\\xcancel"));
+       globals.push_back(from_ascii("\\cancelto"));
        globals.push_back(from_ascii("\\smash"));
        globals.push_back(from_ascii("\\mathclap"));
        globals.push_back(from_ascii("\\mathllap"));