From a5de1ca0eaecd21fd33a0a191d1a0b9dd97cb54a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 16 Dec 2022 12:30:08 +0100 Subject: [PATCH] fix(debug): calculate stacktrace outisde of vim schedule to make it useful --- lua/noice/util/call.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/noice/util/call.lua b/lua/noice/util/call.lua index cd251e3..6f3eab3 100644 --- a/lua/noice/util/call.lua +++ b/lua/noice/util/call.lua @@ -123,8 +123,8 @@ function M:format(err, stack) end function M:notify(err) + local msg = self:format(err, Config.options.debug) vim.schedule(function() - local msg = self:format(err, Config.options.debug) if not pcall(Util.error, msg) then vim.notify(msg, vim.log.levels.ERROR, { title = "noice.nvim" }) end