diff --git a/lib/bind/math.bind b/lib/bind/math.bind index ffcf7162f1..72b69da6f0 100644 --- a/lib/bind/math.bind +++ b/lib/bind/math.bind @@ -63,12 +63,12 @@ \bind "M-m t e" "math-mutate eqnarray" \bind "M-m t m" "math-mutate multline" -\bind "M-m c i" "tabular-feature insert-column" +\bind "M-m c i" "tabular-feature append-column" \bind "M-m c d" "tabular-feature delete-column" \bind "M-m c c" "tabular-feature copy-column" \bind "M-m c s" "tabular-feature swap-column" -\bind "M-m w i" "tabular-feature insert-row" +\bind "M-m w i" "tabular-feature append-row" \bind "M-m w d" "tabular-feature delete-row" \bind "M-m w c" "tabular-feature copy-row" \bind "M-m w s" "tabular-feature swap-row" diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 495e9a257f..1a767ee4a8 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -423,6 +423,7 @@ Inset::RESULT InsetFormulaBase::localDispatch(FuncRequest const & cmd) case LFUN_INSERT_LABEL: case LFUN_MATH_EXTERN: case LFUN_TABULAR_FEATURE: + case LFUN_PASTESELECTION: bv->lockedInsetStoreUndo(Undo::EDIT); mathcursor->dispatch(cmd); updateLocal(bv, true); @@ -527,15 +528,6 @@ Inset::RESULT InsetFormulaBase::localDispatch(FuncRequest const & cmd) break; } -/* - case LFUN_PASTESELECTION: { - string const clip = bv->getClipboard(); - if (!clip.empty()) - mathed_parse_normal(par_, clip); - break; - } -*/ - case LFUN_PASTE: if (was_macro) mathcursor->macroModeClose(); diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 41f124b34f..c074862276 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -8,6 +8,7 @@ #include "math_parser.h" #include "funcrequest.h" #include "debug.h" +#include "BufferView.h" #include "frontends/Painter.h" @@ -315,6 +316,8 @@ void MathNestInset::notifyCursorLeaves() MathInset::result_type MathNestInset::dispatch (FuncRequest const & cmd, idx_type & idx, pos_type & pos) { + BufferView * bv = cmd.view(); + switch (cmd.action) { case LFUN_PASTE: { @@ -328,6 +331,15 @@ MathInset::result_type MathNestInset::dispatch return DISPATCHED; } + case LFUN_PASTESELECTION: + return + dispatch(FuncRequest(bv, LFUN_PASTE, bv->getClipboard()), idx, pos); + + case LFUN_MOUSE_PRESS: + if (cmd.button() == mouse_button::button2) + return dispatch(FuncRequest(bv, LFUN_PASTESELECTION), idx, pos); + return UNDISPATCHED; + default: return MathInset::dispatch(cmd, idx, pos); }