mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(image): fix disappearing images when changing colorscheme
This commit is contained in:
parent
77204102a1
commit
44e2f8e573
1 changed files with 6 additions and 4 deletions
|
@ -179,10 +179,12 @@ end
|
|||
---@param loc snacks.image.Loc
|
||||
function M:render_grid(loc)
|
||||
local hl = "SnacksImage" .. self.id -- image id is encoded in the foreground color
|
||||
vim.api.nvim_set_hl(0, hl, {
|
||||
fg = self.img.id,
|
||||
sp = self.id,
|
||||
bg = Snacks.image.config.debug.placement and "#FF007C" or nil,
|
||||
Snacks.util.set_hl({
|
||||
[hl] = {
|
||||
fg = self.img.id,
|
||||
sp = self.id,
|
||||
bg = Snacks.image.config.debug.placement and "#FF007C" or nil,
|
||||
},
|
||||
})
|
||||
local lines = {} ---@type string[]
|
||||
for r = 1, loc.height do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue