mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 11:18:26 +00:00
fix(picker): consider zen windows as main. Closes #973
This commit is contained in:
parent
e2e18a94f3
commit
b1db65ac61
2 changed files with 6 additions and 0 deletions
|
@ -57,6 +57,9 @@ function M:find()
|
||||||
if win == 0 or not vim.api.nvim_win_is_valid(win) then
|
if win == 0 or not vim.api.nvim_win_is_valid(win) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
if vim.w[win].snacks_main then
|
||||||
|
return true
|
||||||
|
end
|
||||||
local win_config = vim.api.nvim_win_get_config(win)
|
local win_config = vim.api.nvim_win_get_config(win)
|
||||||
local is_float = win_config.relative ~= ""
|
local is_float = win_config.relative ~= ""
|
||||||
if not is_float then
|
if not is_float then
|
||||||
|
|
|
@ -59,6 +59,9 @@ Snacks.config.style("zen", {
|
||||||
wo = {
|
wo = {
|
||||||
winhighlight = "NormalFloat:Normal",
|
winhighlight = "NormalFloat:Normal",
|
||||||
},
|
},
|
||||||
|
w = {
|
||||||
|
snacks_main = true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- fullscreen indicator
|
-- fullscreen indicator
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue