\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"
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);
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();
#include "math_parser.h"
#include "funcrequest.h"
#include "debug.h"
+#include "BufferView.h"
#include "frontends/Painter.h"
MathInset::result_type MathNestInset::dispatch
(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
{
+ BufferView * bv = cmd.view();
+
switch (cmd.action) {
case LFUN_PASTE: {
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);
}