fix(util): proper fix for lazy notify

This commit is contained in:
Folke Lemaitre 2023-01-11 09:03:45 +01:00
parent bbb59d3ffd
commit 83d18dbcee
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -132,8 +132,8 @@ function M.lazy_notify()
table.insert(notifs, vim.F.pack_len(...))
end
vim.notify = temp
local orig = vim.notify
vim.notify = temp
local timer = vim.loop.new_timer()
local check = vim.loop.new_check()
@ -146,7 +146,7 @@ function M.lazy_notify()
end
vim.schedule(function()
---@diagnostic disable-next-line: no-unknown
for _, notif in ipairs(vim.deepcopy(notifs)) do
for _, notif in ipairs(notifs) do
vim.notify(vim.F.unpack_len(notif))
end
end)