mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-01 21:50:28 +08:00
Apply facing-line rule to input border as well
Visible input border suppressed separator even when it draws no line toward list section (bottom in default layout, top in reverse, vertical). Suppress only when input border has a line on the list side; otherwise fall through to adjacent section check. Also requires header window to have content before treating it as the facing section; hasHeaderWindow returns true with empty header when input border is visible.
This commit is contained in:
+8
-1
@@ -3699,7 +3699,14 @@ func (opts *Options) noSeparatorLine() bool {
|
||||
// NOTE: This does not know that the default separator can be suppressed at
|
||||
// runtime (see Terminal.separatorLength), so the minimum heights derived
|
||||
// from it can be one line taller than strictly necessary.
|
||||
sep := opts.Separator == nil && !opts.InputBorderShape.Visible() || opts.Separator != nil && len(*opts.Separator) > 0
|
||||
//
|
||||
// Whether the input border draws a line on the side facing the list
|
||||
// section; BorderLine always resolves to that side (see NewTerminal)
|
||||
shape := opts.InputBorderShape
|
||||
facingLine := shape == tui.BorderLine ||
|
||||
opts.Layout == layoutReverse && shape.HasBottom() ||
|
||||
opts.Layout != layoutReverse && shape.HasTop()
|
||||
sep := opts.Separator == nil && !facingLine || opts.Separator != nil && len(*opts.Separator) > 0
|
||||
return noSeparatorLine(opts.InfoStyle, sep)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user