commit ca5cac2b514e31be7c356e7b46e5f831399a66ee Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Mon Jul 15 01:17:28 2019 +0200
When pasting several cells in mathed, take cursor position in account Related to bug #11390 --- src/mathed/InsetMathGrid.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 9ba2dda..fe823d4 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;