From 8e4d338de9e0d3b81eb01b016ac0f7dcdf8efb2b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 4 Jan 2025 19:19:18 +0900 Subject: [PATCH] Fix adaptive height in the presence of --list-border and --input-border seq 10 | fzf --height=~100% --- src/terminal.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terminal.go b/src/terminal.go index fd5efa28bd8..93608eab31e 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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++ }