fix(nvim_bin): use 'vim.v.progpath' instead of 'vim.v.argv[1]'

main
bhagwan 2 years ago
parent 519dbf067b
commit b52f92a46b

@ -460,7 +460,7 @@ end
M.wrap_spawn_stdio = function(opts, fn_transform, fn_preprocess)
assert(opts and type(opts) == 'string')
assert(not fn_transform or type(fn_transform) == 'string')
local nvim_bin = vim.v.argv[1]
local nvim_bin = vim.v.progpath
local call_args = opts
for _, fn in ipairs({ fn_transform, fn_preprocess }) do
if type(fn) == 'string' then

@ -52,7 +52,7 @@ function M.raw_async_action(fn, fzf_field_expression, debug)
-- this is for windows WSL and AppImage users, their nvim path isn't just
-- 'nvim', it can be something else
local nvim_bin = vim.v.argv[1]
local nvim_bin = vim.v.progpath
local call_args = ("fzf_lua_server=[[%s]], fnc_id=%d %s"):format(
vim.g.fzf_lua_server, id, debug and ", debug=true" or "")

Loading…
Cancel
Save