mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-06 11:48:23 +00:00
fix(picker): initial preview state when main
This commit is contained in:
parent
270250cf46
commit
cd6e336ec0
1 changed files with 2 additions and 2 deletions
|
@ -335,7 +335,7 @@ function M:init_layout(layout)
|
||||||
end
|
end
|
||||||
end, { buf = true, nested = true })
|
end, { buf = true, nested = true })
|
||||||
|
|
||||||
self.preview:update(preview_main and not preview_hidden and self.main or nil)
|
self.preview:update(preview_main and self.main or nil)
|
||||||
-- apply box highlight groups
|
-- apply box highlight groups
|
||||||
local boxwhl = Snacks.picker.highlight.winhl("SnacksPickerBox")
|
local boxwhl = Snacks.picker.highlight.winhl("SnacksPickerBox")
|
||||||
for _, win in pairs(self.layout.box_wins) do
|
for _, win in pairs(self.layout.box_wins) do
|
||||||
|
@ -511,7 +511,7 @@ function M:show()
|
||||||
end
|
end
|
||||||
self.shown = true
|
self.shown = true
|
||||||
self.layout:show()
|
self.layout:show()
|
||||||
if self.preview.main then
|
if self.preview.main and self:preview_opts().enabled then
|
||||||
self.preview.win:show()
|
self.preview.win:show()
|
||||||
end
|
end
|
||||||
self:_focus()
|
self:_focus()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue