From 8b58b55e40221ca5124f156f47e46185310fbe1c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 11 Dec 2024 22:26:23 +0100 Subject: [PATCH] fix(notifier): toggle show history. Fixes #197 --- lua/snacks/notifier.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/snacks/notifier.lua b/lua/snacks/notifier.lua index 8841ad15..c9f39585 100644 --- a/lua/snacks/notifier.lua +++ b/lua/snacks/notifier.lua @@ -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 {}