bfredl / nvim-miniyank

killring-alike plugin for neovim and vim 8 with no default mappings
MIT License
233 stars 15 forks source link

on_yank error related to luaeval #24

Open bdlangton opened 4 years ago

bdlangton commented 4 years ago

Hello, nice plugin. I am using vim 8.2.1300 with lua 5.3 compiled on Mac OS 10.14.3. When I do a command that copies code (yy, dd, etc) I get the following error:

~/.vim/bundle/nvim-miniyank/lua/miniyank.lua:39: bad argument #1 to 'open' (string expected, got userdata)

I have discovered that if I change the following in autoload/miniyank.vim (line 27), it fixes the issue:

- return luaeval("miniyank.write(_A[0], _A[1])",[g:miniyank_filename,a:data])
+ return luaeval("miniyank.write(_A[1], _A[2])",[g:miniyank_filename,a:data])

I am not familiar with lua, but maybe you have an idea. It seems like it expects the array to start at 1, not 0. Maybe that is just with vim and not neovim, I'm not sure.

comfortablynick commented 4 years ago

I am having this issue too; for now I’ve disabled on Vim since I primarily use Neovim.