]> git.lyx.org Git - features.git/commitdiff
fix parser bug for \begin{align}...\end{align}
authorAndré Pönitz <poenitz@gmx.net>
Fri, 15 Feb 2002 14:18:44 +0000 (14:18 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 15 Feb 2002 14:18:44 +0000 (14:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3545 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_parser.C

index 79229b2d959aa54472313a96688209bd43b03f0e..c6d24218aab0b8e1a0be408187e5443b9ace795d 100644 (file)
@@ -588,10 +588,16 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
                curr_label_.erase();
 
                // reading a row
-               for (MathInset::col_type col = 0; col < p->ncols(); ++col) {
-                       //lyxerr << "reading cell " << row << " " << col << "\n";
+               for (MathInset::col_type col = 0; true; ++col) {
+                       //lyxerr << "reading cell " << row << " " << col << " "
+                       // << p->ncols() << "\n";
                        //lyxerr << "ncols: " << p->ncols() << "\n";
                
+                       if (col >= p->ncols()) {
+                               //lyxerr << "adding col " << col << "\n";
+                               p->addCol(p->ncols());
+                       }
+
                        MathArray & ar = p->cell(col + row * p->ncols());
                        parse_into(ar, FLAG_BLOCK);
                        // remove 'unnecessary' braces: