mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(layout): ignore very zindex windows for calulating layout zindex, so that it stays below things like notifications
This commit is contained in:
parent
6e16c85212
commit
47340e6b0b
1 changed files with 4 additions and 1 deletions
|
|
@ -53,7 +53,10 @@ function M.new(opts)
|
|||
local zindex = self.opts.layout.zindex or 50
|
||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||
if vim.w[win].snacks_win or vim.w[win].snacks_layout then
|
||||
zindex = math.max(zindex, (vim.api.nvim_win_get_config(win).zindex or 0) + 1)
|
||||
local other = vim.api.nvim_win_get_config(win).zindex or 0
|
||||
if other < 100 then -- ignore very high zindex windows
|
||||
zindex = math.max(zindex, other + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
self.opts.layout.zindex = zindex + 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue