mirror of
https://github.com/neovim/neovim.git
synced 2026-11-02 20:30:40 -06: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:
1 parent
3bd7492a69
commit
e48179f31e
1 file changed
+4
@@ -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