mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(dashboard): better handling of closed dashboard win
This commit is contained in:
parent
b72364f916
commit
6cb7fdfb03
1 changed files with 3 additions and 2 deletions
|
@ -263,9 +263,10 @@ function D:init()
|
|||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("WinEnter", {
|
||||
group = self.augroup,
|
||||
callback = function(ev)
|
||||
if ev.buf == self.buf then
|
||||
self.win = vim.api.nvim_get_current_win()
|
||||
if ev.buf == self.buf and not vim.api.nvim_win_is_valid(self.win) then
|
||||
self.win = vim.fn.bufwinid(self.buf)
|
||||
self:update()
|
||||
end
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue