junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
64.33k stars 2.38k forks source link

[Feature request] Adjust the height of the preview window automatically #1996

Open yutkat opened 4 years ago

yutkat commented 4 years ago

Info

Problem / Steps to reproduce

When wrapping is set, I want you to be able to automatically adjust the height of the preview window by the length of the inputted characters. I don't want to show margins.

reproduce

echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | \
fzf --height 50% --preview "echo {}" --preview-window=up:30%:wrap

argument example)

echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | \
fzf --height 50% --preview "echo {}" --preview-window=up:fitwrap

actual behavior

2020-04-21_11-36

expected behavior

2020-04-21_11-36_1

vovcacik commented 2 years ago

Related #2435

axel-angel commented 2 years ago

Now that #2435 is implemented, is it possible to have this one too? :smile_cat: I could give a hand maybe