From 6a3ced3cfb14c851053ddada9abaa9c3cd4f659d Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 25 Sep 2016 02:00:55 +0200 Subject: [PATCH] Do not confuse global commands with ERT macros --- src/Cursor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cursor.cpp b/src/Cursor.cpp index bdd6986099..2658d45488 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1479,7 +1479,8 @@ bool Cursor::macroModeClose() 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() + && !atom.nucleus()->asInsetMath(); if (in && in->currentMode() == Inset::TEXT_MODE && atom.nucleus()->currentMode() == Inset::MATH_MODE -- 2.39.2