From d58d3f677442fc8b2ee2454a1da8f5eedd8b95ac Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 22 Oct 2017 23:09:37 +0200 Subject: [PATCH] Account for shadowed system macros Part of #10694. --- src/Cursor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Cursor.cpp b/src/Cursor.cpp index d21570a41f..cc9b76eee0 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 -- 2.39.5