rbong / vim-flog

A blazingly fast, stunningly beautiful, exceptionally powerful git branch viewer for Vim/Neovim.
750 stars 22 forks source link

Vim:E118: Too many arguments for function: virtcol #147

Closed AchmadFathoni closed 1 week ago

AchmadFathoni commented 1 week ago
Vim:E118: Too many arguments for function: virtcol
stack traceback:
^I[C]: in function 'virtcol'
^I...oni/.config/nvim/plugged/vim-flog/lua/flog/highlight.lua:53: in function 'hl_cb'
^I.../toni/.config/nvim/plugged/vim-flog/lua/flog/autocmd.lua:11: in function 'nvim_init_hl_autocmd'
^I.../toni/.config/nvim/plugged/vim-flog/lua/flog/autocmd.lua:45: in function <.../toni/.config/nvim/plugged/vim-flog/lua/flog/autocmd.lua:27>

Flog is working fine, except it just throws this error recently. My setup:

- Platform: linux
- Nvim Version: NVIM v0.9.5
  Build type: Release
  LuaJIT 2.1.1693350652

  system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
  /nix/store/939b2xyf52q9w9nkp6ll20y6nqbm5ydl-neovim-unwrapped-0.9.5/share/nvim
rbong commented 1 week ago

Thank you for reporting. It appears to be lack of support for calling virtcol() with a specific window id on older versions of Neovim.

Previously I was only able to run automated tests on the newest version of Neovim, it looks like older versions might have the support I need now though.

I will update tests and fix this when I have a chance. I recommend updating to a newer version of Neovim if you can, though.

rbong commented 1 week ago

This particular issue should be fixed, I can't guarantee you won't get more errors though, since I haven't updated tests.

AchmadFathoni commented 1 week ago

Unfortunately after applying your update, this error still happen. Since this error is not impairing the plugin function in my case, I guess I'll wait till my OS update nvim. Feel free to close this issue.

rbong commented 1 week ago

There was another argument to virtcol() that wasn't required, I removed that as well.

AchmadFathoni commented 1 week ago

Thank you, @rbong . The error is gone.

rbong commented 1 week ago

Thanks again for reporting. I'm now targeting Neovim 0.9.5 in tests, so you should find it's better supported.