chentoast/marks.nvim

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

TamaMcGlinn opened this issue · 4 comments

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?

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.

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

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

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