[Bug] alternate preview layout maintains separate hidden state
- Dominant language
- Go
- Stars
- 83k
- Forks
- 2.9k
- Avg merge
- 17h 8m
- Merged PRs (30d)
- 10
Description
### Checklist
- [X] I have read through the manual page (`man fzf`)
- [X] I have searched through the existing issues
- [X] For bug reports, I have checked if the bug is reproducible in the latest version of fzf
### Output of `fzf --version`
0.56.2
### OS
- [X] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
### Shell
- [ ] bash
- [X] zsh
- [ ] fish
### Problem / Steps to reproduce
Consider the below command:
```sh
echo "line1\nline2" | fzf --preview 'echo $FZF_PREVIEW_COLUMNS' --preview-window 'right,60%,<80(down:45%)' --preview-window 'nohidden'
```
Run the command in any terminal width and use a keybind to hide the preview:
- If the preview was `down` extend the terminal width until preview is shown on the right
- If the preview was `right` decrease the terminal width until preview is shown at the bottom
It's very easy to do if you have a tmux split into two panes and then use `-z` to "zoom" the pane which extends it to full terminal width.
It seems that the hidden state is saved per layout (horizontal/veritcal), when extending the terminal width the preview will lose its hidden state and will be un-hidden, when decreasing the terminal width again the preview will be hidden again.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.