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

View File

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