Skip to content

Commit

Permalink
fix(api): Apply itemgroup filter correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Mar 19, 2024
1 parent 7863b98 commit abba465
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/legendary/ui/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local function select_inner(opts, context, itemlist)

if itemlist then
Log.trace('Launching select UI')
else
elseif opts.itemgroup then
Log.trace('Relaunching select UI for an item group')
-- if no itemlist passed, try to use itemgroup
-- if an item group id is specified, use that
Expand All @@ -42,6 +42,8 @@ local function select_inner(opts, context, itemlist)
else
Log.error('Expected itemlist, got %s.\n %s', type(itemlist), vim.inspect(itemlist))
end
else
itemlist = State.items
end

local prompt = opts.select_prompt or Config.select_prompt
Expand Down Expand Up @@ -105,7 +107,7 @@ end
function M.select(opts)
vim.cmd('doautocmd User LegendaryUiPre')
local context = Executor.build_context()
select_inner(opts, context, State.items)
select_inner(opts, context)
end

return M

0 comments on commit abba465

Please sign in to comment.