m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 14:23:47 -05:00

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

View File

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