mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 19:28:24 +00:00
feat(zen): make zen/zoom mode work for floating windows. Closes #5028
This commit is contained in:
parent
12e68a33b5
commit
05bb95739a
1 changed files with 4 additions and 0 deletions
|
@ -109,8 +109,12 @@ function M.zen(opts)
|
|||
end
|
||||
|
||||
local parent_win = vim.api.nvim_get_current_win()
|
||||
local parent_zindex = vim.api.nvim_win_get_config(parent_win).zindex
|
||||
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local win_opts = Snacks.win.resolve({ style = "zen" }, opts.win, { buf = buf })
|
||||
win_opts.zindex = parent_zindex and parent_zindex + 1 or win_opts.zindex
|
||||
|
||||
if Snacks.util.is_transparent() and type(win_opts.backdrop) == "table" then
|
||||
win_opts.backdrop.transparent = false
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue