mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix math matrix column insertion on paste
This commit is contained in:
parent
5c663849d1
commit
7869960888
@ -1627,7 +1627,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
col_type startcol = col(cur.idx());
|
col_type startcol = col(cur.idx());
|
||||||
row_type startrow = cur.row();
|
row_type startrow = cur.row();
|
||||||
col_type oldncols = ncols();
|
col_type oldncols = ncols();
|
||||||
col_type const numcols =
|
col_type numcols =
|
||||||
min(grid.ncols(), ncols() - startcol);
|
min(grid.ncols(), ncols() - startcol);
|
||||||
row_type const numrows =
|
row_type const numrows =
|
||||||
min(grid.nrows(), nrows() - cur.row());
|
min(grid.nrows(), nrows() - cur.row());
|
||||||
@ -1651,6 +1651,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
addCol(c + 1);
|
addCol(c + 1);
|
||||||
idx_type i = index(r + cur.row(), c + 1);
|
idx_type i = index(r + cur.row(), c + 1);
|
||||||
cell(i).append(grid.cell(grid.index(r, c)));
|
cell(i).append(grid.cell(grid.index(r, c)));
|
||||||
|
++numcols;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// amend cursor position if cols have been appended
|
// amend cursor position if cols have been appended
|
||||||
|
Loading…
Reference in New Issue
Block a user