]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathGrid.cpp
Substack support for XHTML.
[lyx.git] / src / mathed / InsetMathGrid.cpp
index 163c6e61e6dd7cd7cf88b18f616b74e91e7ff8e2..c9f9ed2537f8c0377ceebfa5e8ba54aab7ece50d 100644 (file)
@@ -67,9 +67,9 @@ static int extractInt(istream & is)
 static void resetGrid(InsetMathGrid & grid)
 {
        while (grid.ncols() > 1)
-               grid.delCol(grid.ncols());
+               grid.delCol(grid.ncols() - 1);
        while (grid.nrows() > 1)
-               grid.delRow(grid.nrows());
+               grid.delRow(grid.nrows() - 1);
        grid.cell(0).erase(0, grid.cell(0).size());
        grid.setDefaults();
 }
@@ -1191,7 +1191,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                if (cur.idx() > 0)
                        --cur.idx();
                cur.pos() = cur.lastpos();
-
+               cur.forceBufferUpdate();
                //mathcursor->normalize();
                //cmd = FuncRequest(LFUN_FINISHED_BACKWARD);
                break;