kankaristo / atom-multi-cursor-plus

Improved multi-cursor functionality for Atom: https://atom.io/packages/multi-cursor-plus
MIT License
20 stars 1 forks source link

If first action is delete, last cursor does double delete. #18

Open ghost opened 6 years ago

ghost commented 6 years ago

Hey, love the package,

Found an issue with the first action being a delete when the rows are canted.. the last cursor does a double delete on the first del keystroke. Give attached.

This can be prevented from happening if you first press SPACE then do your delete action. So for some reason its only on first action delete. Any other action prior nullifies the issue.

gliienabth

Regards, Slater

kankaristo commented 6 years ago

Are you marking the last cursor?

This is (used to be?) an issue with any action, if you mark the last cursor, instead of just moving the cursor to its final position (no mark command).

The mark command creates a new cursor at the current cursor's position, so there are actually 2 cursors there. When you press Delete, both of those cursors delete a character, and then Atom combines the cursors into one cursor (similar to when you have multiple cursors on the same line and you press Home). The way to avoid this is to not mark the last cursor.

Unfortunately, I haven't used Atom for a few months now (switched to VSCode), so it's unlikely that I'll work on this package anymore...