]> git.lyx.org Git - features.git/commitdiff
Amend 6a3ced3c
authorEnrico Forestieri <forenr@lyx.org>
Sun, 25 Sep 2016 16:59:07 +0000 (18:59 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 25 Sep 2016 16:59:07 +0000 (18:59 +0200)
ERT macros are also math insets, sigh...

src/Cursor.cpp

index 2658d45488c3640ca32b05fa3c705bf624d2e707..6f393e3799b7242f0b8c41e48195dc4ec639e80e 100644 (file)
@@ -1479,8 +1479,7 @@ 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()
-                                    && !atom.nucleus()->asInsetMath();
+       bool ert_macro = !user_macro && it == words.end() && atomAsMacro;
 
        if (in && in->currentMode() == Inset::TEXT_MODE
            && atom.nucleus()->currentMode() == Inset::MATH_MODE