breakParagraphConservative(
buffer.params(),
insertion, i, j);
+ break;
}
}
}
}
}
+ InsetText in(buffer);
// Make sure there is no class difference.
- InsetText in;
+ in.paragraphs().clear();
// This works without copying any paragraph data because we have
// a specialized swap method for ParagraphList. This is important
// since we store pointers to insets at some places and we don't
// merge the first par of the insertion with the current par
mergeParagraph(buffer.params(), pars, pit);
}
+ //FIXME: We should call setBuffer() on each inserted paragraph.
+ // instead, we call setBuffer() for the main inset at the beginning
+ // of updateLabels()
pit_type last_paste = pit + insertion.size() - 1;
// 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->inset().setBuffer(*buffer);
buffer->params().setDocumentClass(docclass);
ostringstream lyx;
if (buffer->write(lyx))
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);
}
}