diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 73df673861..b56dd16efa 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1333,7 +1333,12 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type c) return true; } - if (isAlphaASCII(c) || c == '*') { + // do not finish macro for known * commands + MathWordList const & mwl = mathedWordList(); + bool star_macro = c == '*' + && (mwl.find(name.substr(1) + "*") != mwl.end() + || cur.buffer().getMacro(name.substr(1) + "*", cur, true)); + if (isAlphaASCII(c) || star_macro) { cur.activeMacro()->setName(name + docstring(1, c)); return true; }