]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
* GuiToolbar.cpp:
[lyx.git] / src / CutAndPaste.cpp
index 79f81f29fbd25e4b925e96b12de2a79f024ccad3..e878e30c1f4bd647bbe0c6411dabf06ba8f2faa0 100644 (file)
@@ -124,6 +124,7 @@ pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
                                        breakParagraphConservative(
                                                        buffer.params(),
                                                        insertion, i, j);
+                                       break;
                                }
                        }
                }
@@ -367,9 +368,10 @@ void putClipboard(ParagraphList const & paragraphs,
        // some kind of garbage collection there, or a shared_ptr, then this
        // would not be needed.
        static Buffer * buffer = theBufferList().newBuffer(
-               FileName::tempName().absFilename());
+               FileName::tempName().absFilename() + "_clipboard.internal");
        buffer->setUnnamed(true);
        buffer->paragraphs() = paragraphs;
+       buffer->inset().setBuffer(*buffer);
        buffer->params().setDocumentClass(docclass);
        ostringstream lyx;
        if (buffer->write(lyx))
@@ -757,7 +759,7 @@ void saveSelection(Cursor & cur)
        if (cur.selection() 
            && cur.selBegin() == cur.bv().cursor().selBegin()
            && cur.selEnd() == cur.bv().cursor().selEnd()) {
-               LYXERR(Debug::ACTION, "'" << cur.selectionAsString(true) << "'");
+               LYXERR(Debug::SELECTION, "saveSelection: '" << cur.selectionAsString(true) << "'");
                copySelectionToStack(cur, selectionBuffer);
        }
 }