Skip to content

Commit

Permalink
fix: ignore empty completion type in input mode
Browse files Browse the repository at this point in the history
Closes #1309
  • Loading branch information
Saghen committed Feb 25, 2025
1 parent 62c9365 commit d2551d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/blink/cmp/sources/cmdline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ function cmdline:get_completions(context, callback)
local query = (text_before_argument .. current_arg_prefix):gsub([[\\]], [[\\\\]])
-- TODO: handle `custom` type
local type = not vim.startswith(completion_type, 'custom') and vim.fn.getcmdcompltype() or 'cmdline'
completions = vim.fn.getcompletion(query, type)
if type == '' then
completions = {}
else
completions = vim.fn.getcompletion(query, type)
end
end

-- Cmdline mode
Expand Down

0 comments on commit d2551d6

Please sign in to comment.