}
case LFUN_CLIPBOARD_PASTE:
- cur.clearSelection();
+ cap::replaceSelection(cur);
pasteClipboardText(cur, bv->buffer().errorList("Paste"),
cmd.argument() == "paragraph");
bv->buffer().errors("Paste");
break;
case LFUN_PRIMARY_SELECTION_PASTE:
+ cap::replaceSelection(cur);
pasteString(cur, theSelection().get(),
cmd.argument() == "paragraph");
break;
// Copy the selection buffer to the clipboard stack,
// because we want it to appear in the "Edit->Paste
// recent" menu.
+ cap::replaceSelection(cur);
cap::copySelectionToStack();
cap::pasteSelection(bv->cursor(), bv->buffer().errorList("Paste"));
bv->buffer().errors("Paste");
void Text::pasteString(Cursor & cur, docstring const & clip,
bool asParagraphs)
{
- cur.clearSelection();
if (!clip.empty()) {
cur.recordUndo();
if (asParagraphs)
* USER INTERFACE
-- Fix various crashes when single document is edited in more windows (bug 8203).
+- Fix various crashes when single document is edited in more windows
+ (bug 8203).
+
+- Replace current selection when pasting (bug 8027).
* DOCUMENTATION AND LOCALIZATION