]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathHull.cpp
Fix bug #6595: empty last row of matrix or eqnarray vanishes.
[features.git] / src / mathed / InsetMathHull.cpp
index dd2b7fea911fd18facecd45bb049f5c030e643f3..d6dbce83f164de47ac5a9cb32b0d51aec40a0d6a 100644 (file)
@@ -1122,7 +1122,7 @@ void InsetMathHull::mutate(HullType newtype)
 }
 
 
-docstring InsetMathHull::eolString(row_type row, bool fragile) const
+docstring InsetMathHull::eolString(row_type row, bool fragile, bool last_eoln) const
 {
        docstring res;
        if (numberedType()) {
@@ -1132,7 +1132,9 @@ docstring InsetMathHull::eolString(row_type row, bool fragile) const
                if (nonum_[row] && (type_ != hullMultline))
                        res += "\\nonumber ";
        }
-       return res + InsetMathGrid::eolString(row, fragile);
+       // Never add \\ on the last empty line of eqnarray and friends
+       last_eoln = false;
+       return res + InsetMathGrid::eolString(row, fragile, last_eoln);
 }