chentoast / marks.nvim

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

E5108: mark.lua:195: Argument "pos" must be a [row,col] array #28

Closed TamaMcGlinn closed 2 years ago

TamaMcGlinn commented 2 years ago

I installed the plugin, copied the default config from the README into my vimrc and started playing around.

I used m0 to add a bookmark, opened a second tab, added another, switched back to the previous tab and tried m] to jump to the other tab. I realize I should have pressed m} instead, so you would expect the plugin to just do nothing in this case.

Instead, I got this error:

E5108: Error executing lua .../marks.nvim/lua/marks/mark.lua:195: Argument "pos" must be a [row,col] array

Unfortunately, I cannot reproduce this. However, perhaps add a nice assertion at the given line, so that future error messages will tell you what "pos" can hold in these edge cases?

chentoast commented 2 years ago

Hm, I can't reproduce this error. Could you share your setup configuration for this plugin? I can try and take a look, but it might be hard to find anything without a concrete repro.

TamaMcGlinn commented 2 years ago

I copied the default config from your README. I just tried it again on a different machine with the same result.

These repro steps seem to always work:

1) Open vim 2) Try m] (which should do nothing, but in fact adds a mark called 'j' on the second line of the file 3) dmj to delete that 4) m] again crashes

chentoast commented 2 years ago

This should hopefully be fixes in latest master, so I am tentatively closing this. Please reopen if the issue is still there.

chentoast commented 2 years ago

Btw, I didn’t observe any cases of m] setting the “j” mark. If you still see that behavior, maybe file another issue?