On Ticket #6570, http://www.lyx.org/trac/ticket/6570.

The culprit here seems to be in

`Text3.cpp`:


{{{
static bool doInsertInset(Cursor & cur, Text * text,
        FuncRequest const & cmd, bool edit, bool pastesel)
{
...


        bool gotsel = false;
        if (cur.selection()) {
                cutSelection(cur, false, pastesel);
                cur.clearSelection();
                gotsel = true;
        }
        text->insertInset(cur, inset);

...
}
}}}

Maybe there are similar passages elsewhere that need to be fixed.

Removing `cutSelection(cur, false, pastesel);` seems to solve the problem about overwritten clipboards. But then the current clipboard is inserted into the inset and the current selection is not removed.

(I started with adding `eraseSelection(cur);` instead but it's undefined. How does one add the definition from `CutAndPaste.cpp`?)

But since this ticket is so old maybe it is very tricky to solve it? In any case feel free to take over. My knowledge is probably too limited. :)

Daniel

Reply via email to