Fix adaptive height in the presence of --list-border and --input-border

seq 10 | fzf --height=~100%
This commit is contained in:
Junegunn Choi 2025-01-04 19:19:18 +09:00
parent 8a71e091a8
commit 8e4d338de9
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -1067,6 +1067,12 @@ func (t *Terminal) visibleHeaderLines() int {
// Extra number of lines needed to display fzf // Extra number of lines needed to display fzf
func (t *Terminal) extraLines() int { func (t *Terminal) extraLines() int {
extra := t.visibleHeaderLines() + 1 extra := t.visibleHeaderLines() + 1
if t.inputBorderShape.Visible() {
extra += borderLines(t.inputBorderShape)
}
if t.listBorderShape.Visible() {
extra += borderLines(t.listBorderShape)
}
if !t.noSeparatorLine() { if !t.noSeparatorLine() {
extra++ extra++
} }