Skip to content

Commit 8c8acf7

Browse files
committed
fix: stop processing messages when Neovim is exiting. Fixes #237
1 parent 8d80a69 commit 8c8acf7

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

lua/noice/init.lua

-7
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ function M.setup(opts)
2121
require("noice.commands").setup()
2222
require("noice.message.router").setup()
2323
M.enable()
24-
vim.api.nvim_create_autocmd("VimLeavePre", {
25-
callback = function()
26-
if Config.is_running() then
27-
pcall(M.disable)
28-
end
29-
end,
30-
})
3124
end)
3225
end
3326

lua/noice/message/router.lua

+4
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ function M.get_views()
142142
end
143143

144144
function M.update()
145+
if vim.v.exiting ~= vim.NIL then
146+
return
147+
end
148+
145149
if M._updating then
146150
return
147151
end

0 commit comments

Comments
 (0)