Skip to content

Commit

Permalink
fix: filter error when sub flags table is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo-ss committed Mar 26, 2024
1 parent dc3647a commit 552d3df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/fs/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ function M.setup(opts)
return commands.flag_filter(lead_arg, flags)
elseif #args == 2 and has_valid_flag and has_space then
return sub_flags
elseif #args == 3 and has_valid_flag and not has_space then
return commands.filter(lead_arg, sub_flags)
elseif #args == 3 and has_valid_flag and not has_space and not vim.tbl_isempty(sub_flags) then
return commands.flag_filter(lead_arg, sub_flags)
end
end,
})
Expand Down

0 comments on commit 552d3df

Please sign in to comment.