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