]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / MathParser.cpp
index 478e906308a76b706cee5953323cebe4bbfc5dce..0ba33751865b37ca10a9bbe0b78e7cad80df19d7 100644 (file)
@@ -1369,7 +1369,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        // otherwise parse it as an user macro
                        MathData count;
                        parse(count, FLAG_ITEM, mode);
-                       int cols;
+                       int cols = 0;
                        // limit arbitrarily to 100 columns
                        if (extractNumber(count, cols) && cols > 0 && cols < 100) {
                                // resize the table if necessary
@@ -1546,7 +1546,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
 
                else if (t.cs() == "ref" || t.cs() == "eqref" || t.cs() == "prettyref"
                          || t.cs() == "nameref" || t.cs() == "pageref"
-                         || t.cs() == "vpageref" || t.cs() == "vref") {
+                         || t.cs() == "vpageref" || t.cs() == "vref" 
+                         || t.cs() == "formatted" || t.cs() == "labelonly") {
                        cell->push_back(MathAtom(new InsetMathRef(buf, t.cs())));
                        docstring const opt = parse_verbatim_option();
                        docstring const ref = parse_verbatim_item();