mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00: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:
@ -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()
|
||||
|
Reference in New Issue
Block a user