mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	`pumvisible()` returns a number, and numbers are always `true` in Lua, so the return value needs to be checked explicitly. Using https://github.com/neovim/neovim/pull/12900 as context, it appears the intention was to move into the `if` branch when the completion popup is not shown (i.e. `vim.fn.pumvisible() == 0`).
This commit is contained in:
		| @@ -726,7 +726,7 @@ function M.focusable_float(unique_name, fn) | |||||||
|   local bufnr = api.nvim_get_current_buf() |   local bufnr = api.nvim_get_current_buf() | ||||||
|   do |   do | ||||||
|     local win = find_window_by_var(unique_name, bufnr) |     local win = find_window_by_var(unique_name, bufnr) | ||||||
|     if win and api.nvim_win_is_valid(win) and not vim.fn.pumvisible() then |     if win and api.nvim_win_is_valid(win) and vim.fn.pumvisible() == 0 then | ||||||
|       api.nvim_set_current_win(win) |       api.nvim_set_current_win(win) | ||||||
|       api.nvim_command("stopinsert") |       api.nvim_command("stopinsert") | ||||||
|       return |       return | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 runiq
					runiq