Open duianto opened 5 years ago
evil-paste-pop (keybinding: M-y) isn't supported by evil-mc as described by the error message:
evil-paste-pop
M-y
evil-mc
evil-mc Failed to execute evil-paste-pop with error: evil-paste-pop is not supported
But when M-y is pressed with multiple evil-mc cursors, then it can causes three different undo issues.
All (at least any recently) typed characters are undone when u is pressed, instead of each undo stopping where the cursor had exited to normal state.
u
Or either of these two messages can appear when u is pressed:
primitive-undo: Unrecognized entry in undo list undo-tree-canary
primitive-undo: Changes to be undone are outside visible portion of buffer
At least with 2 and 3, there's no past undo history, which will lead to lost work.
With the evil and evil-mc packages installed and loaded:
evil
(require 'evil) (evil-mode) (require 'evil-mc)
C-x b
test
RET
M-x
evil-mc-mode
a
ESC
o
b
c
yy
grh
p
evil-paste-after
All three typed letters a, b and c were undone. Before pressing M-y, the typed letters were undone one at a time.
grq
This message appears:
Gvggd
Esc
And there's no previous undo history.
Since the evil-paste-pop command isn't supported, then it's fine that an error message is shown.
But the undo history should not break.
evil-mc-20190321.1606 evil-20190222.1212
In both: GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 Windows 10 Version 1803
And GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-02-28 Ubuntu 18.04.2 (as a virtualbox guest with Win 10 as host)
Thanks @duianto, I'll take a look when I get a chance.
Description
evil-paste-pop
(keybinding:M-y
) isn't supported byevil-mc
as described by the error message:But when
M-y
is pressed with multiple evil-mc cursors, then it can causes three different undo issues.1
All (at least any recently) typed characters are undone when
u
is pressed, instead of each undo stopping where the cursor had exited to normal state.2
Or either of these two messages can appear when
u
is pressed:3
At least with 2 and 3, there's no past undo history, which will lead to lost work.
Steps to reproduce
Setup:
With the
evil
andevil-mc
packages installed and loaded:C-x b
test
RET
M-x
evil-mc-mode
RET
a
ESC
o
b
ESC
o
c
ESC
yy
(so that the kill-ring at least contains one item)Issue 1:
grh
p
(which callsevil-paste-after
)M-y
to callevil-paste-pop
u
All three typed letters
a
,b
andc
were undone. Before pressingM-y
, the typed letters were undone one at a time.Issue 2:
grq
a
and exit to normal stateESC
yy
grh
p
M-y
M-y
u
This message appears:
Issue 3:
grq
Gvggd
a
Esc
o
b
Esc
u
once, only thea
remainsgrh
p
M-y
u
, the pasted text is undone (as expected)u
again, thea
remains, and this message appears:And there's no previous undo history.
Expected
Since the
evil-paste-pop
command isn't supported, then it's fine that an error message is shown.But the undo history should not break.
System Info
evil-mc-20190321.1606 evil-20190222.1212
In both: GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 Windows 10 Version 1803
And GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-02-28 Ubuntu 18.04.2 (as a virtualbox guest with Win 10 as host)