Skip to content

Commit 0867870

Browse files
liskinibhagwan
authored andcommitted
fix(ui_select): fix E5101 if invoked through v:lua
This fixes "E5101: Cannot convert given Lua type" when invoking vim.ui.select through v:lua-call, e.g.: :call v:lua.vim.ui.select(["foo", "bar"], {}, luaeval('function(x) print(x) end')) core.fzf_exec returns a tuple, the first element of which is an object of type "thread", which can't be converted to a vimscript value. But vim.ui.select isn't meant to return anything, so the fix is to just drop the return — which was presumably added by accident (ui_select isn't really a provider like the others, and isn't meant to be combined, so doesn't need to return anything). Fixes: 594b4f7 ("feat: combine pickers (#1879)")
1 parent 1749fed commit 0867870

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/providers/ui_select.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ M.ui_select = function(items, ui_opts, on_choice)
212212
-- casues issues with abort as on_choice(nil) won't be called (#2439)
213213
opts.no_hide = opts.no_hide == nil and true or opts.no_hide
214214

215-
return core.fzf_exec(entries, opts)
215+
core.fzf_exec(entries, opts)
216216
end
217217

218218
return M

0 commit comments

Comments
 (0)