summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-02-01 16:54:46 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-02-01 17:03:59 +0900
commit18cbb4a84d187adc121e5937b1ec027e00c66f0a (patch)
tree0eb142e14b841949e6b9243d17b843c5d425ea8f /src/options.go
parente84afe196a85f677aef272677a346082f88bdfb6 (diff)
downloadfzf-18cbb4a84d187adc121e5937b1ec027e00c66f0a.tar.gz
Display header lines at the top in 'reverse-list' layout
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go
index b7eed83c..2b91fbf7 100644
--- a/src/options.go
+++ b/src/options.go
@@ -3110,7 +3110,14 @@ func postProcessOptions(opts *Options) error {
if opts.HeaderLinesShape == tui.BorderNone {
opts.HeaderLinesShape = tui.BorderPhantom
} else if opts.HeaderLinesShape == tui.BorderUndefined {
- opts.HeaderLinesShape = tui.BorderNone
+ // In reverse-list layout, header lines should be at the top, while
+ // ordinary header should be at the bottom. So let's use a separate
+ // window for the header lines.
+ if opts.Layout == layoutReverseList {
+ opts.HeaderLinesShape = tui.BorderPhantom
+ } else {
+ opts.HeaderLinesShape = tui.BorderNone
+ }
}
if opts.Pointer == nil {