]> git.lyx.org Git - features.git/commitdiff
Do not confuse global commands with ERT macros
authorEnrico Forestieri <forenr@lyx.org>
Sun, 25 Sep 2016 00:00:55 +0000 (02:00 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 25 Sep 2016 00:00:55 +0000 (02:00 +0200)
src/Cursor.cpp

index bdd69860992eb5d552d6dad0f7317f4b35489092..2658d45488c3640ca32b05fa3c705bf624d2e707 100644 (file)
@@ -1479,7 +1479,8 @@ bool Cursor::macroModeClose()
        bool keep_mathmode = it != words.end() && (it->second.inset == "font"
                                                || it->second.inset == "oldfont"
                                                || it->second.inset == "mbox");
-       bool ert_macro = !user_macro && it == words.end();
+       bool ert_macro = !user_macro && it == words.end()
+                                    && !atom.nucleus()->asInsetMath();
 
        if (in && in->currentMode() == Inset::TEXT_MODE
            && atom.nucleus()->currentMode() == Inset::MATH_MODE