mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(ui): set current win only when its valid
This commit is contained in:
parent
3a7b8c8132
commit
3814883aaa
2 changed files with 4 additions and 1 deletions
|
@ -81,7 +81,9 @@ function M.show(mode)
|
|||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
once = true,
|
||||
callback = function()
|
||||
vim.api.nvim_set_current_win(win)
|
||||
if win and vim.api.nvim_win_is_valid(win) then
|
||||
pcall(vim.api.nvim_set_current_win, win)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue