[Feature request] Adjust the height of the preview window automatically
- Dominant language
- Go
- Stars
- 83k
- Forks
- 2.9k
- Avg merge
- 17h 8m
- Merged PRs (30d)
- 10
Description
- [x] I have read through the manual page (`man fzf`)
- [x] I have the latest version of fzf
- [x] I have searched through the existing issues
## Info
- OS
- [x] Linux
- Shell
- [x] zsh
## 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
```shell
echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | \
fzf --height 50% --preview "echo {}" --preview-window=up:30%:wrap
```
### argument example)
```shell
echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | \
fzf --height 50% --preview "echo {}" --preview-window=up:fitwrap
```
### actual behavior

### expected behavior

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing fzf's --preview-window handling, especially the existing wrap and percentage-height behavior, using the reproduction command as the baseline. Done means a fitwrap-style option adjusts the preview height to wrapped input without leaving unwanted margins, while the existing preview-window behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100