mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
feat(notifier): keep notif open when it's the current window
This commit is contained in:
parent
97acbbb654
commit
1e9580039b
1 changed files with 1 additions and 0 deletions
|
@ -215,6 +215,7 @@ function M:update()
|
|||
self.queue = vim.tbl_filter(function(notif)
|
||||
local timeout = notif.timeout or self.opts.timeout
|
||||
local keep = not notif.shown -- not shown yet
|
||||
or (notif.win and notif.win:win_valid() and vim.api.nvim_get_current_win() == notif.win.win) -- current window
|
||||
or (notif.keep and notif.keep(notif)) -- custom keep
|
||||
or (notif.shown + timeout > now) -- not timed out
|
||||
if not keep and notif.win then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue