ERT macros are also math insets, sigh...
This commit is contained in:
Enrico Forestieri 2016-09-25 18:59:07 +02:00
parent 4508a7f855
commit 3bc80220a7

View File

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