mirror of
https://github.com/junegunn/fzf.git
synced 2026-11-21 09:24:04 +01:00
An empty picker using adaptive height and inline info can be one row tall when
there is no input. Initialization emitted ESC[0A, which terminals interpret as
moving up one row, overwriting the preceding line.
Skip the cursor-up escape when no upward movement is needed.
Test is in test/test_layout.rb. Manual repro is easy with:
```
printf 'KEEP THIS LINE\n'; env FZF_DEFAULT_OPTS= FZF_DEFAULT_OPTS_FILE= \
fzf --style=minimal --height='~50%' --info=inline-right </dev/null
```
Before the fix, KEEP THIS LINE disappears. Afterward, it remains above the picker.
Fix #4958