Skip to content

Commit

Permalink
fix(ui): set current win only when its valid
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 21, 2022
1 parent 3a7b8c8 commit 3814883
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@
- [x] Most emojis in "Configuration" aren't shown for me.
- [x] add section on how to uninstall
- [x] add `:Packadd` command or something similar
- [ ] headless install
4 changes: 3 additions & 1 deletion lua/lazy/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3814883

Please sign in to comment.