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

Display header lines at the top in 'reverse-list' layout

This commit is contained in:
Junegunn Choi
2025-02-01 16:54:46 +09:00
parent e84afe196a
commit 18cbb4a84d
5 changed files with 189 additions and 97 deletions

View File

@@ -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 {