SidOfc/mkdx

Bug: an infinite number of undo-able changes are created when adding a numbered list item

benelan opened this issue · 2 comments

Bug report

OS type:

  • Unix
  • Windows
  • Other ([SPECIFY])

Vim:

  • vim
  • neovim
  • Other ([SPECIFY])

Vim version:

NVIM v0.10.0-dev-958+gb641fc387

Reproduce steps:

  1. Create a new file: nvim test.md
  2. Open Undotree if you have it (optional)
  3. Insert the following: 1. test
  4. Press escape
  5. Undo-able changes will be continuously created. It's a new file so there shouldn't be much undo history, however you can press u forever. If you have Undotree installed you can see the infinite number of undo-able changes being generated.

Expected:

I expect creating a numbered list item to not generate an infinite number of undo-able changes.

Actual:

An infinite number of undo-able changes are generated when creating a numbered list item.


Thanks for your work on this plugin! It seems really handy and I'd like to use it, but unfortunately this is a blocker since I rely heavily on my undo history.

SidOfc commented

Hello there, cheers for submitting a report.

Unfortunately following these steps does not seem to reproduce the same behavior for me testing with a clean no-plugin vimrc. I'm using :undolist to list changes. Since I also use persistent-undo I made sure to clear the history of my local test file beforehand.

This is what I'm seeing after doing some additional edits after typing 1. test and pressing <esc>:
image

In such cases I always do wonder if mkdx was tested in isolation as well, perhaps some other plugin might be interfering, or perhaps the way mkdx inserts list items might not be compatible with Undotree for some reason?

As it stands there's not much to go from though, do you also see infinite undos via :undolist?

SidOfc commented

Hello there, I just wanted to ask if this is still relevant. If not or if I don't get any response I'm going to close this issue.