}
+void copySelectionToTemp(Cursor & cur)
+{
+ copySelectionToStack(cur, tempCut);
+}
+
+
void copySelection(Cursor const & cur, docstring const & plaintext)
{
// In tablemode, because copy and paste actually use special table stack
/// Push the current selection to the cut buffer and the system clipboard.
void copySelection(Cursor const & cur);
+/// Like copySelection, but only put to temporary cut buffer
+void copySelectionToTemp(Cursor & cur);
///
void copyInset(Cursor const & cur, Inset * inset, docstring const & plaintext);
/**
namespace lyx {
using cap::copySelection;
+using cap::copySelectionToTemp;
using cap::cutSelection;
using cap::cutSelectionToTemp;
using cap::pasteFromStack;
bool gotsel = false;
if (cur.selection()) {
- cutSelectionToTemp(cur, false, pastesel);
+ if (cmd.action() == LFUN_INDEX_INSERT)
+ copySelectionToTemp(cur);
+ else
+ cutSelectionToTemp(cur, false, pastesel);
+ cur.clearSelection();
+ gotsel = true;
+ } else if (cmd.action() == LFUN_INDEX_INSERT) {
+ gotsel = text->selectWordWhenUnderCursor(cur, WHOLE_WORD);
+ copySelectionToTemp(cur);
cur.clearSelection();
- gotsel = true;
}
text->insertInset(cur, inset);