m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-13 13:53:47 -05:00

Allow toggling of alternative preview window layout that is hidden

Fix #3113
This commit is contained in:
Junegunn Choi
2023-01-07 11:21:52 +09:00
parent 3b2244077d
commit 23d8b78ce1
3 changed files with 107 additions and 71 deletions

View File

@@ -207,6 +207,14 @@ type previewOpts struct {
alternative *previewOpts
}
func (o *previewOpts) Visible() bool {
return o.size.size > 0 || o.alternative != nil && o.alternative.size.size > 0
}
func (o *previewOpts) Toggle() {
o.hidden = !o.hidden
}
func parseLabelPosition(opts *labelOpts, arg string) {
opts.column = 0
opts.bottom = false