]> git.lyx.org Git - lyx.git/commitdiff
Fix math matrix column insertion on paste
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 29 Jun 2020 16:05:46 +0000 (18:05 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 29 Jun 2020 16:05:46 +0000 (18:05 +0200)
src/mathed/InsetMathGrid.cpp

index 6aaddc2177ddad47c9c31ed3e3cae875f3290ab3..fa1aae45f9be9e6a4d951aa501095e634c094b3a 100644 (file)
@@ -1627,7 +1627,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                        col_type startcol =  col(cur.idx());
                        row_type startrow = cur.row();
                        col_type oldncols = ncols();
-                       col_type const numcols =
+                       col_type numcols =
                                min(grid.ncols(), ncols() - startcol);
                        row_type const numrows =
                                min(grid.nrows(), nrows() - cur.row());
@@ -1651,6 +1651,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                                        addCol(c + 1);
                                        idx_type i = index(r + cur.row(), c + 1);
                                        cell(i).append(grid.cell(grid.index(r, c)));
+                                       ++numcols;
                                }
                        }
                        // amend cursor position if cols have been appended