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() && atomAsMacro;
if (in && in->currentMode() == Inset::TEXT_MODE
&& atom.nucleus()->currentMode() == Inset::MATH_MODE
// The logic here should more or less match to the
// Cursor::setCurrentFont logic, i.e. the cursor height should
// give a hint what will happen if a character is entered.
+ // FIXME: this is not the case, what about removing this method ? (see #10478).
// HACK. far from being perfect...