]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathSupport.cpp
Move some Cursor methods to CursorData
[lyx.git] / src / mathed / MathSupport.cpp
index 1c4f89ca8dc9dcf69695303a1605c068715d8c5a..bb6a21c74d74ce9e302b18c5982a51f1cadfc63b 100644 (file)
@@ -505,7 +505,7 @@ deco_struct const * search_deco(docstring const & name)
 }
 
 
-} // namespace anon
+} // namespace
 
 
 int mathed_font_em(FontInfo const & font)
@@ -961,8 +961,13 @@ docstring asString(MathData const & ar)
 
 void asArray(docstring const & str, MathData & ar, Parse::flags pf)
 {
+       // If the QUIET flag is set, we are going to parse for either
+       // a paste operation or a macro definition. We try to do the
+       // right thing in all cases.
+
        bool quiet = pf & Parse::QUIET;
-       if ((str.size() == 1 && quiet) || (!mathed_parse_cell(ar, str, pf) && quiet))
+       bool macro = pf & Parse::MACRODEF;
+       if ((str.size() == 1 && quiet) || (!mathed_parse_cell(ar, str, pf) && quiet && !macro))
                mathed_parse_cell(ar, str, pf | Parse::VERBATIM);
 }