Make it possible to change one-time preview window

This commit is contained in:
Junegunn Choi 2025-01-23 18:45:36 +09:00
parent 32eb8c1be9
commit c71e4ddee4
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -5662,7 +5662,10 @@ func (t *Terminal) Loop() error {
// Preview command can be running in the background if the size of
// the preview window is 0 but not 'hidden'
wasHidden := currentPreviewOpts.hidden
updatePreviewWindow(false)
// FIXME: One-time preview window can't reappear once hidden
// fzf --bind space:preview:ls --bind 'enter:change-preview-window:down|left|up|hidden|'
updatePreviewWindow(t.hasPreviewWindow() && !t.activePreviewOpts.hidden)
if wasHidden && t.hasPreviewWindow() {
// Restart
refreshPreview(t.previewOpts.command)