mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* src/CutAndPaste.C
(copySelectionToStack): whitespace (copySelection): Avoid possibly expensive conversion if we are not debugging git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17295 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4bbddb06e6
commit
21d1457c8d
@ -609,9 +609,9 @@ void copySelectionToStack(LCursor & cur, CutStack & cutstack)
|
||||
ParagraphList & pars = text->paragraphs();
|
||||
pos_type pos = cur.selBegin().pos();
|
||||
pit_type par = cur.selBegin().pit();
|
||||
while (pos < pars[par].size()
|
||||
&& pars[par].isLineSeparator(pos)
|
||||
&& (par != cur.selEnd().pit() || pos < cur.selEnd().pos()))
|
||||
while (pos < pars[par].size() &&
|
||||
pars[par].isLineSeparator(pos) &&
|
||||
(par != cur.selEnd().pit() || pos < cur.selEnd().pos()))
|
||||
++pos;
|
||||
|
||||
copySelectionHelper(cur.buffer(), pars, par, cur.selEnd().pit(),
|
||||
@ -651,8 +651,10 @@ void copySelection(LCursor & cur, docstring const & plaintext)
|
||||
|
||||
void saveSelection(LCursor & cur)
|
||||
{
|
||||
lyxerr[Debug::ACTION] << "cap::saveSelection: `"
|
||||
<< to_utf8(cur.selectionAsString(true)) << "'." << endl;
|
||||
if (lyxerr.debugging(Debug::ACTION))
|
||||
lyxerr << "cap::saveSelection: `"
|
||||
<< to_utf8(cur.selectionAsString(true)) << "'."
|
||||
<< endl;
|
||||
|
||||
if (cur.selection())
|
||||
copySelectionToStack(cur, selectionBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user