gpanders / nvim-parinfer

parinfer for Neovim
Other
165 stars 4 forks source link

Insert mode backspace issues #11

Open knubie opened 2 years ago

knubie commented 2 years ago

Sorry to be a bother but I've stumbled on another issue while daily driving the plugin. 😅

In this case using backspace while in insert mode seems to create some issues for the nested form. It looks as though at some point maybe the state is getting de-synced or something.

In the video below I'm using backspace in insert mode to move the vector back, but the inner vector seems to lag behind. Then when I hit u to undo, and o to insert a new line, it almost looks as if it is using some older state to calculate the new position of the inner vector.

https://user-images.githubusercontent.com/431251/154578496-08da5144-da87-41fc-a957-707f7e896976.mov

I also noticed some odd behavior when I put my cursor directly under the e in defn and hit dw, but I cannot reproduce that for a video.

Let me know if you need any more information from me.

gpanders commented 2 years ago

Thanks, I'll take a look at this.

The change tracking required to get smart mode working properly is quite tricky to get right, as you've noticed. I appreciate you filing these bug reports so that we can keep working out the kinks.

Hmm although in this case it looks like the change tracking is working as expected, so there is something else going wrong. Hopefully it's not a bug in the parinfer implementation itself.