fix(notifier): toggle show history. Fixes #197

This commit is contained in:
Folke Lemaitre 2024-12-11 22:26:23 +01:00
parent ec191b3fe9
commit 8b58b55e40
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -449,6 +449,10 @@ end
---@param opts? snacks.notifier.history
function N:show_history(opts)
if vim.bo.filetype == "snacks_notif_history" then
vim.cmd("close")
return
end
local win = Snacks.win({ style = "notification.history", enter = true, show = false })
local buf = win:open_buf()
opts = opts or {}