summaryrefslogtreecommitdiffstats
path: root/src/terminal.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-10-21 16:11:15 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-10-21 16:11:15 +0900
commitf5e4ee90e45db7d7833ea5f3927dc868b2002939 (patch)
treee22950188b3be6ad604b64bd11cef4d49c059598 /src/terminal.go
parent690d5e6dbd7922f7bedcf5caa9ca376e33b235d4 (diff)
Fix bug where top section of the previous preview content appearing
when the preview window is re-enabled and the current preview process is taking more than 500ms and previewDelayed is triggered fzf --preview 'sleep 1; date; seq 1000' --bind space:toggle-preview
Diffstat (limited to 'src/terminal.go')
-rw-r--r--src/terminal.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 687352fe..9fac9779 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -3100,6 +3100,10 @@ func (t *Terminal) Loop() {
t.previewBox.Set(reqPreviewEnqueue,
previewRequest{t.previewOpts.command, t.pwindow, t.evaluateScrollOffset(), list})
}
+ } else {
+ // Discard the preview content so that it won't accidentally appear
+ // when preview window is re-enabled and previewDelay is triggered
+ t.previewer.lines = nil
}
}
case actTogglePreviewWrap: