Allow toggling of alternative preview window layout that is hidden

Fix #3113
This commit is contained in:
Junegunn Choi committed 2023-01-07 15:12:31 +09:00
1 parent 3b2244077d
commit 23d8b78ce1
3 files changed
+107 -71

No files matched your search

+8
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