]> git.lyx.org Git - features.git/commitdiff
* better fix for * math commands. We allow the * for known math commands and for...
authorStefan Schimanski <sts@lyx.org>
Wed, 27 Feb 2008 10:46:38 +0000 (10:46 +0000)
committerStefan Schimanski <sts@lyx.org>
Wed, 27 Feb 2008 10:46:38 +0000 (10:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23273 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathNest.cpp

index 73df673861d3f156a727f5d7bd60a23bec17e737..b56dd16efa67ee0dddea12faa137e3f34f19def1 100644 (file)
@@ -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;
                }