diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-01-07 11:21:52 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-01-07 15:12:31 +0900 |
commit | 23d8b78ce12a6d9182a3e576de96123eb4ad176d (patch) | |
tree | 755778678bf737bbe08a84c43fce2cb9d604bbc8 /src/options.go | |
parent | 3b2244077d3e7d299943077b33e0564ffcd1f384 (diff) |
Allow toggling of alternative preview window layout that is hidden
Fix #3113
Diffstat (limited to 'src/options.go')
-rw-r--r-- | src/options.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/options.go b/src/options.go index e4a6aa39..350ab94d 100644 --- a/src/options.go +++ b/src/options.go @@ -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 |