When pasting several cells in mathed, take cursor position in account

Related to bug #11390
This commit is contained in:
Jean-Marc Lasgouttes 2019-07-15 01:17:28 +02:00
parent 1d56ea325a
commit ca5cac2b51

View File

@ -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;