Fix adaptive height with an inline header or footer border
CodeQL / Analyze (go) (push) Canceled after 0s
build / build (push) Canceled after 0s
Test fzf on macOS / build (push) Canceled after 0s

- extraLines() used borderLines(), which reports zero for BorderInline
- Divider drawn for an inline section still takes a line, and
  resizeWindows() reserves it via addInline()
- So adaptive height came up one line short per inline section and the
  list scrolled
- Affects --header-lines-border, --header-border and --footer-border
  alike. All three set came up three lines short
- Without a list border the shape normalizes to BorderTop or BorderBottom,
  which report a line, hence --no-list-border looked like a fix

    seq 10 | fzf --height=~100% --list-border \
                 --header-lines=1 --header-lines-border=inline

Fix #4904
This commit is contained in:
Junegunn Choi
2026-09-06 11:27:17 +09:00
parent a52ac843d7
commit 1372d04f79
3 changed files with 35 additions and 3 deletions
+2
View File
@@ -6,6 +6,8 @@ CHANGELOG
- Fixed an escape sequence split across reads being parsed as a fragment, which leaked the rest into the query (#4899)
- e.g. A terminal answering the startup `DECRQM` query late left `?2004;2$y`, CTRL-UP left `5A`, and SGR mouse input left `0;1;1M`
- Fixed `--tiebreak=pathname` not detecting the last path separator when the line contains a non-ASCII character before it (#4902)
- Fixed adaptive height not reserving a line for the divider of an inline header or footer border, so the list came up one line short for each of them (#4904)
- e.g. `seq 10 | fzf --height=~100% --list-border --header-lines=1 --header-lines-border=inline`
- Vim plugin
- fzf no longer blocks the editor, so live previews keep working while fzf is open
- `fzf#run` returns an empty list when it runs fzf asynchronously. Use `sink`, `sinklist`, or `exit` to get the result