summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-23 18:45:36 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-23 18:45:36 +0900
commitc71e4ddee41d3381fb9ec25cc7078bdb25ac4b27 (patch)
treec7ba696183936ea8767c00f4b3dcadfdcb1035ff /src
parent32eb8c1be99940e34ed1a820fcb61512a8adf102 (diff)
downloadfzf-c71e4ddee41d3381fb9ec25cc7078bdb25ac4b27.tar.gz
Make it possible to change one-time preview window
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 983729ed..4d577fc5 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -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)