mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
lsp: fix failed switch window error (#12900)
* fix failed switch window error * checks if window already exists
This commit is contained in:
parent
4a2618c817
commit
f34eeba2d8
@ -668,7 +668,7 @@ function M.focusable_float(unique_name, fn)
|
||||
local bufnr = api.nvim_get_current_buf()
|
||||
do
|
||||
local win = find_window_by_var(unique_name, bufnr)
|
||||
if win then
|
||||
if win and api.nvim_win_is_valid(win) and not vim.fn.pumvisible() then
|
||||
api.nvim_set_current_win(win)
|
||||
api.nvim_command("stopinsert")
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user