Compare commits

..

2 Commits

Author SHA1 Message Date
pull[bot]
d7da1e75ba
Merge 6f943112a9 into a30181e240 2025-01-12 05:59:07 +00:00
Junegunn Choi
6f943112a9
Align header with the list 2025-01-12 14:58:55 +09:00
2 changed files with 24 additions and 14 deletions

View File

@ -2391,9 +2391,19 @@ func (t *Terminal) printHeaderImpl() {
} }
// Wrapping is not supported for header // Wrapping is not supported for header
wrap := t.wrap 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 indentSize := t.pointerLen + t.markerLen
if t.headerBorderShape.HasLeft() && !t.listBorderShape.HasLeft() { if t.headerWindow != nil {
indentSize = util.Max(0, indentSize-(1+t.borderWidth)) if t.listBorderShape.HasLeft() {
indentSize += 1 + t.borderWidth
}
if t.headerBorderShape.HasLeft() {
indentSize -= 1 + t.borderWidth
}
} }
indent := strings.Repeat(" ", indentSize) indent := strings.Repeat(" ", indentSize)
t.wrap = false t.wrap = false

View File

@ -3513,9 +3513,9 @@ class TestGoFZF < TestBase
11 11
> 10 > 10
LIST LIST
3 3
2 2
1 1
INPUT INPUT
19/97 19/97
> 1 > 1
@ -3529,9 +3529,9 @@ class TestGoFZF < TestBase
11 11
> 10 > 10
list list
3 3
2 2
1 1
input input
19/97 19/97
> 1 > 1
@ -3556,9 +3556,9 @@ class TestGoFZF < TestBase
19/97 19/97
> 1 > 1
3 3
2 2
1 1
BLOCK BLOCK
@ -3572,9 +3572,9 @@ class TestGoFZF < TestBase
19/97 19/97
> 1 > 1
3 3
2 2
1 1
BLOCK BLOCK