Skip to content

wrong location for substitution on fake cursors when evil-move-cursor-back is nil  #129

@josephmturner

Description

@josephmturner

Running emacs 27.2 with just this config:

(require 'evil)
(evil-mode 1)
(setq evil-move-cursor-back nil) ;; Entering and leaving insert mode is idempotent
(require 'evil-mc)
(global-evil-mc-mode 1)

Given a buffer with the following text:

a b c
a b c
a b c

Place your cursor on b in the first line then run evil-mc-make-and-goto-next-match twice (C-n C-n). You should now have a fake cursor on the first two bs, and the real cursor on the third.
Run evil-substitute (s).
Expected result:

a  c
a  c
a  c

Actual result:

a bc
a bc
a  c

In both cases, you should be in insert state as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions