mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(notifier): re-apply winhl since level might have changed with a replace
This commit is contained in:
parent
5fd9c426e8
commit
b8cc93e273
1 changed files with 7 additions and 10 deletions
|
|
@ -436,21 +436,19 @@ function N:render(notif)
|
|||
backdrop = false,
|
||||
ft = notif.ft,
|
||||
noautocmd = true,
|
||||
wo = {
|
||||
winhighlight = table.concat({
|
||||
"Normal:" .. notif_hl.msg,
|
||||
"NormalNC:" .. notif_hl.msg,
|
||||
"FloatBorder:" .. notif_hl.border,
|
||||
"FloatTitle:" .. notif_hl.title,
|
||||
"FloatFooter:" .. notif_hl.footer,
|
||||
}, ","),
|
||||
},
|
||||
keys = {
|
||||
q = function()
|
||||
self:hide(notif.id)
|
||||
end,
|
||||
},
|
||||
})
|
||||
win.opts.wo.winhighlight = table.concat({
|
||||
"Normal:" .. notif_hl.msg,
|
||||
"NormalNC:" .. notif_hl.msg,
|
||||
"FloatBorder:" .. notif_hl.border,
|
||||
"FloatTitle:" .. notif_hl.title,
|
||||
"FloatFooter:" .. notif_hl.footer,
|
||||
}, ",")
|
||||
notif.win = win
|
||||
---@diagnostic disable-next-line: invisible
|
||||
local buf = win:open_buf()
|
||||
|
|
@ -578,7 +576,6 @@ function N:layout()
|
|||
notif.win.opts.col = vim.o.columns - notif.layout.width - self.opts.margin.right
|
||||
notif.shown = notif.shown or ts()
|
||||
notif.win:show()
|
||||
notif.win:update()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue