We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
nvim_get_hl_by_name
1 parent 3f13f08 commit 24234f4Copy full SHA for 24234f4
lua/lazy/view/float.lua
@@ -131,8 +131,14 @@ function M:mount()
131
self.buf = vim.api.nvim_create_buf(false, true)
132
end
133
134
- local normal = vim.api.nvim_get_hl(0, { name = "Normal" })
135
- local has_bg = normal and normal.bg ~= nil
+ local normal, has_bg
+ if vim.fn.has("nvim-0.9.0") == 0 then
136
+ normal = vim.api.nvim_get_hl_by_name("Normal", true)
137
+ has_bg = normal and normal.background ~= nil
138
+ else
139
+ normal = vim.api.nvim_get_hl(0, { name = "Normal" })
140
+ has_bg = normal and normal.bg ~= nil
141
+ end
142
143
if has_bg and self.opts.backdrop and self.opts.backdrop < 100 and vim.o.termguicolors then
144
self.backdrop_buf = vim.api.nvim_create_buf(false, true)
0 commit comments