Hide default separator when a border separates input from list

- Applies when adjacent section (header, header lines, or list) draws
  border line facing input section

    # No separator below header border
    fzf --style full --input-border none --header foo

    # Separator shown; nothing separates input from list
    fzf --style full --input-border none --header foo --no-header-border

- Evaluated dynamically so change-header/toggle-header update it
This commit is contained in:
Junegunn Choi
2026-07-17 23:18:00 +09:00
parent e877b6f846
commit 5e31fd25e7
5 changed files with 106 additions and 33 deletions
+3
View File
@@ -3696,6 +3696,9 @@ func (opts *Options) noSeparatorLine() bool {
if opts.Inputless {
return true
}
// NOTE: This can overestimate by one line when the default separator is
// suppressed at runtime (see Terminal.separatorLength), making the height
// lower bounds derived from it one line more generous than necessary.
sep := opts.Separator == nil && !opts.InputBorderShape.Visible() || opts.Separator != nil && len(*opts.Separator) > 0
return noSeparatorLine(opts.InfoStyle, sep)
}