On 14.10.2016 17:14, racoon wrote:
On 13.10.2016 10:46, Guillaume Munch wrote:
Le 12/10/2016 à 20:02, racoon a écrit :
On 10.10.2016 17:49, Richard Heck wrote:


Please prepare binaries.

I am on 2.2.2 now. There is something strange happening when I *replace*
stuff from the beginning of a paragraph before a space by pasting some
inset, e.g. note, label, citation, etc. It removes the following space.
Maybe someone can test it on 2.2.1 whether this is a new or old bug.


Steps to reproduce:
1. Start a new paragraph write two (or three or four or ...) words
(separated by a space)
2. Select the first (or first two or first three or ...) word(s) and
insert a label (or a citation or paste a note or ...)

Actual result:
- The space between the words vanishes

Expected result:
- It does not

I can reproduce with 2.1.5. I think this is an old bug.

It actually affects not only insets but any kind of pasting operation,
including text. Quite nasty bug I think. I can try to have a look at it
but it probably concerns areas I haven't looked at before.

Not sure what exactly it is yet. There is some (unnecessary) cleaning going on when removing a selection. It is probably in the eraseSelectionHelper in CutAndPaste.cpp. It seems to remove the leading space in a paragraph when deleting from the beginning of the paragraph up to a space. I guess the idea was that LyX does not allow for leading spaces that's why they should be automatically removed.

But I guess they should not be. They will be cleaned up anyway after the cursor leaves the paragraph. This is also the case at other places. For example, when selecting the first word and replacing it by entering a character the bug does not occur. Also, the leading space is not removed when deleting the first word without selection, i.e. one character after the other. That's why there must be a bug here as well or, what I find more likely, the deletion of the leading space is really unnecessary.


Reply via email to