commit d58d3f677442fc8b2ee2454a1da8f5eedd8b95ac
Author: Enrico Forestieri <[email protected]>
Date: Sun Oct 22 23:09:37 2017 +0200
Account for shadowed system macros
Part of #10694.
---
src/Cursor.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index d21570a..cc9b76e 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -1451,9 +1451,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