From ca5cac2b514e31be7c356e7b46e5f831399a66ee Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 15 Jul 2019 01:17:28 +0200 Subject: [PATCH] When pasting several cells in mathed, take cursor position in account Related to bug #11390 --- src/mathed/InsetMathGrid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.2