gabesoft / evil-mc

Multiple cursors implementation for evil-mode
MIT License
383 stars 35 forks source link

Backspace in insert-mode seems to not be working #67

Closed rieje closed 7 years ago

rieje commented 7 years ago

I visually select a block of text, then narrow it. I do grm to mark the strings. When I type some characters, the typed characters are reflected in all cursors as expected. However, if I backspace to delete a character, it only deletes the character from the current line (the line with the real cursor).

If I use vim/evil's X to delete the character in visual mode, it deletes it in all lines (so is working properly). So just backspace in insert mode is not working.

gabesoft commented 7 years ago

Are there any errors in the messages buffer? I wonder if there's a conflict with some minor mode or backspace is running some command overwritten by the major mode that you're in. What major mode are you in when you experience this behavior? Does the same happen in the fundamental mode?

rieje commented 7 years ago

It happens even if I don't narrow it. Before and after. There are no errors in the messages buffer--only thing related to evil-mc is evil-mc Created 5 cursors matching "\_<setq\_>".

I was in Emacs Lisp mode and it does not happen in fundamental mode. Let me know how I can diagnose this, I'm an emacs noob.

gabesoft commented 7 years ago

Can you run describe-key and press backspace. See what command it is bound to. On my system that's bound to evil-backward-char

rieje commented 7 years ago

DEL (translated from \<backspace>) runs the command evil-backward-char (found in evil-normal-state-map),

gabesoft commented 7 years ago

Hmm, then it should work. Try running evil-mc-executing-debug-on and backspace again while there are multiple cursors. See if there's any evil-mc output in the messages buffer.

rieje commented 7 years ago

The culprit appears to be hungry-delete. If I disable the mode. Not sure exactly what is causing it though...

gabesoft commented 7 years ago

Oh, I'm glad that you figured it out. I'll add a fix for hungry-delete shortly.