From: Enrico Forestieri Date: Sun, 22 Oct 2017 21:09:37 +0000 (+0200) Subject: Account for shadowed system macros X-Git-Tag: 2.3.0rc1~27 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8f7b40955cc34e31a2932906d334499ef1af3665;p=features.git Account for shadowed system macros Part of #10694. (cherry picked from commit d58d3f677442fc8b2ee2454a1da8f5eedd8b95ac) --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index b82da98ad8..997f5d5535 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1464,9 +1464,10 @@ bool Cursor::macroModeClose() MathWordList const & words = mathedWordList(); MathWordList::const_iterator it = words.find(name); - bool keep_mathmode = it != words.end() && (it->second.inset == "font" - || it->second.inset == "oldfont" - || it->second.inset == "mbox"); + bool keep_mathmode = user_macro + || (it != words.end() && (it->second.inset == "font" + || it->second.inset == "oldfont" + || it->second.inset == "mbox")); bool ert_macro = !user_macro && it == words.end() && atomAsMacro; if (in && in->currentMode() == Inset::TEXT_MODE