From: Jean-Marc Lasgouttes Date: Sun, 14 Jul 2019 23:17:28 +0000 (+0200) Subject: When pasting several cells in mathed, take cursor position in account X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1741 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ca5cac2b514e31be7c356e7b46e5f831399a66ee;p=features.git When pasting several cells in mathed, take cursor position in account Related to bug #11390 --- diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 9ba2dda197..fe823d42e4 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -1629,7 +1629,8 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd) for (row_type r = 0; r < numrows; ++r) { for (col_type c = 0; c < numcols; ++c) { idx_type i = index(r + cur.row(), c + col(cur.idx())); - cell(i).insert(0, grid.cell(grid.index(r, c))); + cell(i).insert(c == 0 ? cur.pos() : 0, + grid.cell(grid.index(r, c))); } if (hline_enabled) rowinfo_[r].lines += grid.rowinfo_[r].lines;