Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esc unaligns the cursors, when real cursor on first column #124

Open
duianto opened this issue Aug 1, 2021 · 1 comment
Open

esc unaligns the cursors, when real cursor on first column #124

duianto opened this issue Aug 1, 2021 · 1 comment

Comments

@duianto
Copy link
Contributor

duianto commented Aug 1, 2021

esc unaligns the cursors when the real cursor is on the first column, but at least one fake cursor is not.

Reproduction steps

With multiple words in a buffer.
and at least one word is indented.

abc
  abc
    abc
  • In evil normal state, create evil-mc cursors on all occurrences by pressing: grm
    The cursors appear at the end of the words.
ab[c]
  ab[c]
    ab[c]
  • Move back the cursors to the beginning of the words: b
[a]bc
  [a]bc
    [a]bc
  • Enter evil insert state: i
|abc
  |abc
    |abc
  • Exit to evil normal state: esc

Observed

The fake cursors moved to the left once.
They are now unaligned with the real cursor.

[a]bc
 [ ]abc
   [ ]abc

Expected

The cursors should remain aligned.

[a]bc
  [a]bc
    [a]bc

System Info

evil-mc-20210730.1752
GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26
Windows 21H1

@duianto
Copy link
Contributor Author

duianto commented Aug 2, 2021

This might not have an easy/desired fix.

The default behavior in Vim when exiting (esc) from insert state to normal state, is that the cursor moves back.
This causes the evil-mc cursors to become unaligned, when the real or a fake cursor is at the beginning of a line.

[a]bc
  |abc
    [a]bc

esc moves back the cursors that are not at the beginning of their lines

[a]bc
 [ ]abc
   [ ]abc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant