diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 16c105524d..6fa185b280 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -501,7 +501,17 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) } if (cmd.button() == mouse_button::button2) { - cmd = FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph"); + if (bvcur.selection()) { + // See comment in LyXText::dispatch why we + // do this + // FIXME This does not use paste_tabular, + // another reason why paste_tabular should go. + cap::copySelectionToStack(bvcur); + cmd = FuncRequest(LFUN_PASTE, "0"); + } else { + cmd = FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, + "paragraph"); + } doDispatch(cur, cmd); } break; diff --git a/src/mathed/InsetMathNest.C b/src/mathed/InsetMathNest.C index 7d808f0528..8dfcd7161a 100644 --- a/src/mathed/InsetMathNest.C +++ b/src/mathed/InsetMathNest.C @@ -1187,9 +1187,11 @@ void InsetMathNest::lfunMousePress(LCursor & cur, FuncRequest & cmd) //cur.noUpdate(); } else if (cmd.button() == mouse_button::button2) { MathArray ar; - if (cur.selection()) + if (cur.selection()) { + // See comment in LyXText::dispatch why we do this + cap::copySelectionToStack(bv.cursor()); asArray(bv.cursor().selectionAsString(false), ar); - else + } else asArray(theSelection().get(), ar); cur.insert(ar);