From 6f943112a9998d504a5660754f400786e79f80b2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 12 Jan 2025 14:58:55 +0900 Subject: Align header with the list --- src/terminal.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/terminal.go b/src/terminal.go index 853adb8e..1ca1c804 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -2391,9 +2391,19 @@ func (t *Terminal) printHeaderImpl() { } // Wrapping is not supported for header wrap := t.wrap + + // Align header with the list + // fzf --header-lines 3 --style full --no-list-border + // fzf --header-lines 3 --style full --no-header-border + // fzf --header-lines 3 --style full --no-header-border --no-input-border indentSize := t.pointerLen + t.markerLen - if t.headerBorderShape.HasLeft() && !t.listBorderShape.HasLeft() { - indentSize = util.Max(0, indentSize-(1+t.borderWidth)) + if t.headerWindow != nil { + if t.listBorderShape.HasLeft() { + indentSize += 1 + t.borderWidth + } + if t.headerBorderShape.HasLeft() { + indentSize -= 1 + t.borderWidth + } } indent := strings.Repeat(" ", indentSize) t.wrap = false -- cgit v1.2.3