Skip to content

Commit

Permalink
Fix adaptive height in the presence of --list-border and --input-border
Browse files Browse the repository at this point in the history
    seq 10 | fzf --height=~100%
  • Loading branch information
junegunn committed Jan 4, 2025
1 parent 8a71e09 commit 8e4d338
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
}
Expand Down

0 comments on commit 8e4d338

Please sign in to comment.