mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-14 22:33: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:
@@ -1067,6 +1067,12 @@ func (t *Terminal) visibleHeaderLines() int {
|
|||||||
// Extra number of lines needed to display fzf
|
// Extra number of lines needed to display fzf
|
||||||
func (t *Terminal) extraLines() int {
|
func (t *Terminal) extraLines() int {
|
||||||
extra := t.visibleHeaderLines() + 1
|
extra := t.visibleHeaderLines() + 1
|
||||||
|
if t.inputBorderShape.Visible() {
|
||||||
|
extra += borderLines(t.inputBorderShape)
|
||||||
|
}
|
||||||
|
if t.listBorderShape.Visible() {
|
||||||
|
extra += borderLines(t.listBorderShape)
|
||||||
|
}
|
||||||
if !t.noSeparatorLine() {
|
if !t.noSeparatorLine() {
|
||||||
extra++
|
extra++
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user