Skip to content

Commit

Permalink
fix(notifier): re-apply winhl since level might have changed with a r…
Browse files Browse the repository at this point in the history
…eplace
  • Loading branch information
folke committed Nov 8, 2024
1 parent 5fd9c42 commit b8cc93e
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions lua/snacks/notifier.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b8cc93e

Please sign in to comment.