parinfer-rust: Undo not working properly in Vim8 and Neovim

I just installed this plugin; I’m using Vim 8.0 on macOS with patches: 1-1650 included. I’m seeing some odd behaviour when I undo. Let’s say I have the following text in the buffer:

(defn f
  [x]
  x)

(defn g
  [y]
  y)

I go to line 4, press O followed by Enter and insert another function so that my buffer looks like this:

(defn f
  [x]
  x)

(defn h
  [z]
  z)

(defn g
  [y]
  y)

Now when I press u to undo, I get:

(defn f
  [x]
  x
  []
  z)

(defn g
  [y]
  y)

whereas I would have expected something like the buffer in the first example above. Pressing u more times doesn’t help - it keeps going through what appears to be a very long changelist but with no change being made to the buffer.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I’m not sure if this is the same issue, but I’m experiencing an issue where undo will just stop undoing after a couple of undos. It’s difficult to give reproduction steps because it sort of happens randomly.

Using Neovim 0.3.7

Neovim has merged 8832 and slated it for the next release!

I’ve narrowed this down to a small case and found that it is a Vim bug and reported it: vim/vim#3291

FWIW, I’m seeing similar undo issues in Neovim on Ubuntu 16.04.

🎉 Vim 8.1.256 makes undo Just Work™!

I’m going to leave this ticket open until this gets merged into Neovim and both are versions that Homebrew installs by default.

@daveyarwood Thanks for the report! I’ve updated the issue title to reflect that.