Skip to content

Commit 0ccf031

Browse files
committed
fix(ui): disable backdrop when Neovim is transparent
1 parent ba58b87 commit 0ccf031

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/lazy/view/float.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ function M:mount()
131131
self.buf = vim.api.nvim_create_buf(false, true)
132132
end
133133

134-
if self.opts.backdrop and self.opts.backdrop < 100 and vim.o.termguicolors then
134+
local normal = vim.api.nvim_get_hl(0, { name = "Normal" })
135+
local has_bg = normal and normal.bg ~= nil
136+
137+
if has_bg and self.opts.backdrop and self.opts.backdrop < 100 and vim.o.termguicolors then
135138
self.backdrop_buf = vim.api.nvim_create_buf(false, true)
136139
self.backdrop_win = vim.api.nvim_open_win(self.backdrop_buf, false, {
137140
relative = "editor",

0 commit comments

Comments
 (0)