fix(notifier): keep notif when current buf is notif buf

This commit is contained in:
Folke Lemaitre 2025-02-16 08:21:33 +01:00
parent b02cb5e882
commit a13c891a59
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -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