mirror of https://github.com/folke/lazy.nvim.git
fix(ui): disable backdrop when Neovim is transparent
This commit is contained in:
parent
ba58b87ed9
commit
0ccf031227
|
@ -131,7 +131,10 @@ function M:mount()
|
||||||
self.buf = vim.api.nvim_create_buf(false, true)
|
self.buf = vim.api.nvim_create_buf(false, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.opts.backdrop and self.opts.backdrop < 100 and vim.o.termguicolors then
|
local normal = vim.api.nvim_get_hl(0, { name = "Normal" })
|
||||||
|
local has_bg = normal and normal.bg ~= nil
|
||||||
|
|
||||||
|
if has_bg and self.opts.backdrop and self.opts.backdrop < 100 and vim.o.termguicolors then
|
||||||
self.backdrop_buf = vim.api.nvim_create_buf(false, true)
|
self.backdrop_buf = vim.api.nvim_create_buf(false, true)
|
||||||
self.backdrop_win = vim.api.nvim_open_win(self.backdrop_buf, false, {
|
self.backdrop_win = vim.api.nvim_open_win(self.backdrop_buf, false, {
|
||||||
relative = "editor",
|
relative = "editor",
|
||||||
|
|
Loading…
Reference in New Issue