Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when using ReaFuzz #3

Open
mantsar opened this issue Apr 8, 2022 · 2 comments
Open

Error message when using ReaFuzz #3

mantsar opened this issue Apr 8, 2022 · 2 comments

Comments

@mantsar
Copy link

mantsar commented Apr 8, 2022

Hi,

Great plugin! However I get error message when executing ReaFuzz:

...vim/pack/minpac/start/osc.nvim/lua/osc/lib/losc/init.lua:96: .../pack/minpac/start/osc.nvim/lua/osc/lib/losc/message.lua:170: Types and arguments mismatch
stack traceback:
^I[C]: in function 'error'
^I...vim/pack/minpac/start/osc.nvim/lua/osc/lib/losc/init.lua:96: in function 'new_message'
^I.../pack/minpac/start/reaper-nvim/lua/reaper-nvim/utils.lua:50: in function 'send_message'
^I.../pack/minpac/start/reaper-nvim/lua/reaper-nvim/utils.lua:35: in function 'send_action_osc'
^I...g/nvim/pack/minpac/start/reaper-nvim/lua/reaper-nvim.lua:20: in function <...g/nvim/pack/minpac/start/reaper-nvim/lua/reaper-nvim.lua:18>
Error detected while processing function 21[30]..<SNR>68_callback:
line   23:
Vim(call):E718: Funcref required

NVIM v0.6.1 . Funny thing is that even with error command gets executed (e.g. Transport: Play). Also I tried other commands like ReaPlay, ReaStop etc... and it works without error message.

@madskjeldgaard
Copy link
Owner

Thanks for reporting. I'm getting the same error here. Do you have any ideas about this @davidgranstrom ? It seems to be related to osc.nvim or losc more specifically

@davidgranstrom
Copy link

@madskjeldgaard Thanks for the notice. I did some debugging and found that the send_message function is in fact called twice when selecting a fzf entry using ReaFuzz, but the first time command_num is nil:

"/action" nil
"/action" 25289

So the error from osc.nvim (losc) is correct. Adding a check at the start of the function makes the error disappear as expected:

  if not command_num then
    return
  end

There is still however another error unrelated to osc.nvim which I think has to do with the fzf wrapper?

Error detected while processing function 12[30]..<SNR>28_callback:
line   23:
Vim(call):E718: Funcref required

Calling fzf_run without the wrapper function appears to work:

fzf_run({source = sources, sink = sinkfunc})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants