fix(picker.preview): reset before notify

This commit is contained in:
Folke Lemaitre 2025-01-19 23:40:35 +01:00
parent 40cea79697
commit e50f2e3909
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -250,6 +250,7 @@ function M:notify(msg, level, opts)
Snacks.notify(msg, { level = level })
return
end
self:reset()
level = level or "info"
local lines = vim.split(level .. ": " .. msg, "\n", { plain = true })
local msg_len = #lines