The previous matching pattern seems to be reused if the cursors are undone back to a single cursor with:
gru (evil-mc-undo-last-added-cursor).
It works as expected if the additional cursors are undone from two or more cursors with:
grq (evil-mc-undo-all-cursors).
Steps to reproduce
With the evil and evil-mc packages installed, and these lines added to init.el:
(require 'evil)
(evil-mode)
(require 'evil-mc)
Start Emacs.
Open a new buffer: C-x btestRET.
Enable evil-mc-mode: M-xevil-mc-modeRET
Type (or copy and paste) in the test buffer:
one
one
two
two
- Move the cursor to the beginning of the buffer: `gg`
- Add a second cursor: `C-n`
Two cursors appear at the end of both instances of the word `one` and the minibuffer shows:
>evil-mc There are 2 cursors matching "\_<one\_>"
- Undo the second cursor: `gru`
- Move to the third line (the first instance of the word: `two`)
- Try to create a second cursor based on the word `two`: `C-n`
### Observed
A cursor was added on the buffers first line (the first instance of the word `one`), and the minibuffer shows:
>evil-mc There are 2 cursors matching "\_<one\_>"
It's the same message as when the second cursor was created from the buffers first line (above).
![emacs_2019-03-18_19-32-50](https://user-images.githubusercontent.com/13420573/54555400-f2ecee00-49b6-11e9-8e5a-0b44780363ee.png)
### Expected
The second cursor should have been added to the second word `two`.
### System Info
Evil-mc-mode Version: 0.0.4
Evil version evil-git-4b195ddfc (Version: 1.2.14)
GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30
Windows 10 Version 1803
Description
The previous matching pattern seems to be reused if the cursors are undone back to a single cursor with:
gru
(evil-mc-undo-last-added-cursor
).It works as expected if the additional cursors are undone from two or more cursors with:
grq
(evil-mc-undo-all-cursors
).Steps to reproduce
With the
evil
andevil-mc
packages installed, and these lines added toinit.el
:C-x b
test
RET
.M-x
evil-mc-mode
RET
test
buffer:two two