]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
Fix bug #6936.
[lyx.git] / src / mathed / InsetMathNest.cpp
index bd702464c35da390883f52609dc66f36c97deb08..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();