]> git.lyx.org Git - lyx.git/commitdiff
* Be more conservative about leaving out parenthesis by checking for < 0x80.
authorStefan Schimanski <sts@lyx.org>
Tue, 7 Oct 2008 16:24:07 +0000 (16:24 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 7 Oct 2008 16:24:07 +0000 (16:24 +0000)
  This fixes lyxmathsym characters as macro arguments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26802 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathMacro.cpp

index eefbfff2cc6bccf4c7661146366d71ea569c2a6b..e61a09f89d52b756cd3b6bca11221e4f7a4efc4d 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "MathMacro.h"
 
 
 #include "MathMacro.h"
 
+#include "InsetMathChar.h"
 #include "MathCompletionList.h"
 #include "MathExtern.h"
 #include "MathStream.h"
 #include "MathCompletionList.h"
 #include "MathExtern.h"
 #include "MathStream.h"
@@ -693,7 +694,8 @@ void MathMacro::write(WriteStream & os) const
        // Print remaining macros 
        for (; i < cells_.size(); ++i) {
                if (cell(i).size() == 1 
        // Print remaining macros 
        for (; i < cells_.size(); ++i) {
                if (cell(i).size() == 1 
-                        && cell(i)[0].nucleus()->asCharInset()) {
+                       && cell(i)[0].nucleus()->asCharInset()
+                       && cell(i)[0].nucleus()->asCharInset()->getChar() < 0x80) {
                        if (first)
                                os << " ";
                        os << cell(i);
                        if (first)
                                os << " ";
                        os << cell(i);