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,
|
backdrop = false,
|
||||||
ft = notif.ft,
|
ft = notif.ft,
|
||||||
noautocmd = true,
|
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 = {
|
keys = {
|
||||||
q = function()
|
q = function()
|
||||||
self:hide(notif.id)
|
self:hide(notif.id)
|
||||||
end,
|
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
|
notif.win = win
|
||||||
---@diagnostic disable-next-line: invisible
|
---@diagnostic disable-next-line: invisible
|
||||||
local buf = win:open_buf()
|
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.win.opts.col = vim.o.columns - notif.layout.width - self.opts.margin.right
|
||||||
notif.shown = notif.shown or ts()
|
notif.shown = notif.shown or ts()
|
||||||
notif.win:show()
|
notif.win:show()
|
||||||
notif.win:update()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue