evil
evil copied to clipboard
repeat-last after completion produces unexpected results
I found an issue with evil-repeat
in combination with evil-paste-pop-next
.
With the following text:
line1: setDateBegin
line2: setDateToChange(getSomeOtherStart)
- place the point at
ToChange
- replace it with
Begin
viacw C-p
(ie, change word and complete current word) - place the point at
Start
- replace it with
.
(ie, repeat last)
The result is
line1: setDateBegin
line2: setDateBegin(getSosetDateBegin)
which is different from the expected result:
line1: setDateBegin
line2: setDateBegin(getSomeOtherBegin)
@mihaicristiantanase - very interesting - thanks for the bug report. Technically when you run evil-complete-previous
(evil-paste-pop-next
has nothing to do with this, I think you did C-h k
from normal state when you meant to do it from insert state?) it changes the whole word to match, even though the bit up until the cursor is identical (so it doesn't appear to change) but this change is stored by evil-repeat and then inserted relative to the cursor (before and after it, in this case). I can't promise I'll have time to take a look soon, but I'll leave this note here to remind myself (or whoever else looks into it) what the cause is.
Thanks for the clarification. You are right about evil-paste-pop-next
- that explains why I could not find anything related to completion there...