chentoast / marks.nvim

A better user experience for viewing and interacting with Vim marks.
MIT License
788 stars 40 forks source link

fix: validate positions on delete and move #11

Closed chentoast closed 2 years ago

chentoast commented 2 years ago

When the buffer state changes, the internal mark list diverges from the actual mark positions. So, recompute mark positions before performing a delete or move.

chentoast commented 2 years ago

Going to merge this as a temporary fix. There are still a couple of bugs with changing buffer state that will need a more principled fix:

I think an implementation based on nvim_buf_attach should be able to solve these problems.