mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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()
|
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 then
|
if win and api.nvim_win_is_valid(win) and not vim.fn.pumvisible() then
|
||||||
api.nvim_set_current_win(win)
|
api.nvim_set_current_win(win)
|
||||||
api.nvim_command("stopinsert")
|
api.nvim_command("stopinsert")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user