Fix copy of multi-cells in table (#12196)

This commit is contained in:
Juergen Spitzmueller 2021-03-12 17:41:43 +01:00
parent ac8948b8e0
commit ae892bff98
2 changed files with 14 additions and 0 deletions

View File

@ -2264,6 +2264,13 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
}
case LFUN_COPY:
// With multi-cell table content, we pass down to the inset
if (cur.inTexted() && cur.selection()
&& cur.selectionBegin().idx() != cur.selectionEnd().idx()) {
buffer_.dispatch(cmd, dr);
dispatched = dr.dispatched();
break;
}
cap::copySelection(cur);
cur.message(_("Copy"));
break;

View File

@ -5262,6 +5262,13 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
}
break;
case LFUN_COPY:
if (cur.selIsMultiCell())
copySelection(cur);
else
cell(cur.idx())->dispatch(cur, cmd);
break;
case LFUN_CUT:
if (cur.selIsMultiCell()) {
if (copySelection(cur)) {