summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-04 19:19:18 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-04 19:19:18 +0900
commit8e4d338de9e0d3b81eb01b016ac0f7dcdf8efb2b (patch)
tree02cb5e52ce72b0e0781917bcfdcc568952f739c8
parent8a71e091a81c5d46770a261f84f8d5674fe73e6e (diff)
downloadfzf-8e4d338de9e0d3b81eb01b016ac0f7dcdf8efb2b.tar.gz
Fix adaptive height in the presence of --list-border and --input-border
seq 10 | fzf --height=~100%
-rw-r--r--src/terminal.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go
index fd5efa28..93608eab 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++
}