* better fix for * math commands. We allow the * for known math commands and for known math macros which are valid at that point in the buffer.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23273 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2008-02-27 10:46:38 +00:00
parent dee531e765
commit c0e2c0cd5c

View File

@ -1333,7 +1333,12 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type c)
return true; 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)); cur.activeMacro()->setName(name + docstring(1, c));
return true; return true;
} }