mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +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()
 | 
					  reset_timer()
 | 
				
			||||||
  Context:cancel_pending()
 | 
					  Context:cancel_pending()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if tonumber(vim.fn.pumvisible()) == 1 and Context.isIncomplete then
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  local win = api.nvim_get_current_win()
 | 
					  local win = api.nvim_get_current_win()
 | 
				
			||||||
  local cursor_row, cursor_col = unpack(api.nvim_win_get_cursor(win)) --- @type integer, integer
 | 
					  local cursor_row, cursor_col = unpack(api.nvim_win_get_cursor(win)) --- @type integer, integer
 | 
				
			||||||
  local line = api.nvim_get_current_line()
 | 
					  local line = api.nvim_get_current_line()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user