Skip to content

Commit

Permalink
fix: cmdline including current arg prefix
Browse files Browse the repository at this point in the history
Closes #609
  • Loading branch information
Saghen committed Dec 17, 2024
1 parent 5926869 commit 49bff2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/blink/cmp/sources/cmdline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function cmdline:get_completions(context, callback)
keyword_config.regex,
keyword_config.exclude_from_prefix_regex
)
local current_arg_prefix = current_arg:sub(1, keyword.start_col - 1)
local current_arg_prefix = current_arg:sub(1, keyword.start_col - #text_before_cursor - 1)

local query = (text_before_cursor .. current_arg_prefix):gsub([[\\]], [[\\\\]])
local completions = vim.fn.getcompletion(query, 'cmdline')
Expand Down

0 comments on commit 49bff2b

Please sign in to comment.