mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 23:12:31 +00:00
Do not omit the starting space when copying (#9995)
The offending code appears to have been introduced a long time ago. My understanding is that it is no longer relevant. Notably, it only appears on copy and not on cut, which tells us that: 1) it should be safe to remove it, 2) we should remove it for consistency.
This commit is contained in:
parent
287db1239b
commit
4fb103180e
@ -961,20 +961,11 @@ void copySelectionToStack(Cursor const & cur, CutStack & cutstack)
|
|||||||
LBUFERR(text);
|
LBUFERR(text);
|
||||||
// ok we have a selection. This is always between cur.selBegin()
|
// ok we have a selection. This is always between cur.selBegin()
|
||||||
// and sel_end cursor
|
// and sel_end cursor
|
||||||
|
copySelectionHelper(*cur.buffer(), *text,
|
||||||
// copy behind a space if there is one
|
cur.selBegin().pit(), cur.selEnd().pit(),
|
||||||
ParagraphList & pars = text->paragraphs();
|
cur.selBegin().pos(), cur.selEnd().pos(),
|
||||||
pos_type pos = cur.selBegin().pos();
|
cur.buffer()->params().documentClassPtr(),
|
||||||
pit_type par = cur.selBegin().pit();
|
cutstack);
|
||||||
while (pos < pars[par].size() &&
|
|
||||||
pars[par].isLineSeparator(pos) &&
|
|
||||||
(par != cur.selEnd().pit() || pos < cur.selEnd().pos()))
|
|
||||||
++pos;
|
|
||||||
|
|
||||||
copySelectionHelper(*cur.buffer(), *text, par, cur.selEnd().pit(),
|
|
||||||
pos, cur.selEnd().pos(),
|
|
||||||
cur.buffer()->params().documentClassPtr(), cutstack);
|
|
||||||
|
|
||||||
// Reset the dirty_tabular_stack_ flag only when something
|
// Reset the dirty_tabular_stack_ flag only when something
|
||||||
// is copied to the clipboard (not to the selectionBuffer).
|
// is copied to the clipboard (not to the selectionBuffer).
|
||||||
if (&cutstack == &theCuts)
|
if (&cutstack == &theCuts)
|
||||||
|
Loading…
Reference in New Issue
Block a user