mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
* 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:
parent
dee531e765
commit
c0e2c0cd5c
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user