]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
comment
[lyx.git] / src / CutAndPaste.cpp
index eb70bb8e1e89005bfae2a7831e871562fabef7c5..64718ae12638fbe63b1eafd658694eb81e36c344 100644 (file)
@@ -124,6 +124,7 @@ pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
                                        breakParagraphConservative(
                                                        buffer.params(),
                                                        insertion, i, j);
+                                       break;
                                }
                        }
                }
@@ -366,7 +367,8 @@ void putClipboard(ParagraphList const & paragraphs,
        // a DocumentClass, via new, that is never deleted. If we were to go to
        // some kind of garbage collection there, or a shared_ptr, then this
        // would not be needed.
-       static Buffer * buffer = theBufferList().newBuffer("");
+       static Buffer * buffer = theBufferList().newBuffer(
+               FileName::tempName().absFilename() + "_clipboard.internal");
        buffer->setUnnamed(true);
        buffer->paragraphs() = paragraphs;
        buffer->params().setDocumentClass(docclass);
@@ -756,7 +758,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);
        }
 }