]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
Kill macro mode when using LFUN_ESCAPE
[lyx.git] / src / mathed / InsetMathNest.cpp
index 229b923d0fbed1ff1d288c3921ac3450421d6b75..a03aaefb168a38304e91042f1d076bc59d1a13bd 100644 (file)
@@ -836,8 +836,12 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                if (cur.selection())
                        cur.clearSelection();
                else  {
-                       cmd = FuncRequest(LFUN_FINISHED_FORWARD);
-                       cur.undispatched();
+                       if (cur.inMacroMode())
+                               cur.macroModeClose(true);
+                       else {
+                               cmd = FuncRequest(LFUN_FINISHED_FORWARD);
+                               cur.undispatched();
+                       }
                }
                break;