From 18cbb4a84d187adc121e5937b1ec027e00c66f0a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 1 Feb 2025 16:54:46 +0900 Subject: Display header lines at the top in 'reverse-list' layout --- src/options.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/options.go') 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 { -- cgit v1.2.3