]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.C
The bug-fix in revision 16531 introduced another bug. This is the right fix. I did...
[lyx.git] / src / CutAndPaste.C
index c899efac6981bf92abd23c3956815fb9d4214c7d..e561f591c35b04bd82701c1ec4c5e10440c675dd 100644 (file)
@@ -559,6 +559,12 @@ void copySelection(LCursor & cur)
        // stuff the selection onto the X clipboard, from an explicit copy request
        theClipboard().put(cur.selectionAsString(true));
 
+       copySelectionToStack(cur);
+}
+
+
+void copySelectionToStack(LCursor & cur)
+{
        // this doesn't make sense, if there is no selection
        if (!cur.selection())
                return;
@@ -641,7 +647,6 @@ void pasteSelection(LCursor & cur, ErrorList & errorList, size_t sel_index)
 }
 
 
-// simple replacing. The font of the first selected character is used
 void replaceSelectionWithString(LCursor & cur, docstring const & str, bool backwards)
 {
        recordUndo(cur);
@@ -680,7 +685,7 @@ void replaceSelection(LCursor & cur)
 
 void eraseSelection(LCursor & cur)
 {
-       //lyxerr << "LCursor::eraseSelection begin: " << cur << endl;
+       //lyxerr << "cap::eraseSelection begin: " << cur << endl;
        CursorSlice const & i1 = cur.selBegin();
        CursorSlice const & i2 = cur.selEnd();
        if (i1.inset().asInsetMath()) {
@@ -707,13 +712,13 @@ void eraseSelection(LCursor & cur)
        } else {
                lyxerr << "can't erase this selection 1" << endl;
        }
-       //lyxerr << "LCursor::eraseSelection end: " << cur << endl;
+       //lyxerr << "cap::eraseSelection end: " << cur << endl;
 }
 
 
 void selDel(LCursor & cur)
 {
-       //lyxerr << "LCursor::selDel" << endl;
+       //lyxerr << "cap::selDel" << endl;
        if (cur.selection())
                eraseSelection(cur);
 }
@@ -721,7 +726,7 @@ void selDel(LCursor & cur)
 
 void selClearOrDel(LCursor & cur)
 {
-       //lyxerr << "LCursor::selClearOrDel" << endl;
+       //lyxerr << "cap::selClearOrDel" << endl;
        if (lyxrc.auto_region_delete)
                selDel(cur);
        else