mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
fix(lsp): suppress completion request if completion is active (#30028)
Problem: the autotrigger mechanism could fire completion requests despite completion already being active from another completion mechanism or manual trigger Solution: add a condition to avoid an additional request.
This commit is contained in:
parent
3bd7492a69
commit
e48179f31e
@ -403,6 +403,10 @@ local function trigger(bufnr, clients)
|
||||
reset_timer()
|
||||
Context:cancel_pending()
|
||||
|
||||
if tonumber(vim.fn.pumvisible()) == 1 and Context.isIncomplete then
|
||||
return
|
||||
end
|
||||
|
||||
local win = api.nvim_get_current_win()
|
||||
local cursor_row, cursor_col = unpack(api.nvim_win_get_cursor(win)) --- @type integer, integer
|
||||
local line = api.nvim_get_current_line()
|
||||
|
Loading…
Reference in New Issue
Block a user