mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-07 21:25:11 +00:00
fix(notifier): keep notif when current buf is notif buf
This commit is contained in:
parent
b02cb5e882
commit
a13c891a59
1 changed files with 1 additions and 0 deletions
|
@ -425,6 +425,7 @@ function N:update()
|
|||
local keep = not notif.shown -- not shown yet
|
||||
or timeout == 0 -- no timeout
|
||||
or (notif.win and notif.win:win_valid() and vim.api.nvim_get_current_win() == notif.win.win) -- current window
|
||||
or (notif.win and notif.win:buf_valid() and vim.api.nvim_get_current_buf() == notif.win.buf) -- current buffer
|
||||
or (notif.keep and notif.keep(notif)) -- custom keep
|
||||
or (self.opts.keep and self.opts.keep(notif)) -- global keep
|
||||
or (notif.shown + timeout / 1e3 > now) -- not timed out
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue