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
pull/3495/head
Junegunn Choi 7 months ago
parent 690d5e6dbd
commit f5e4ee90e4
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -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:

Loading…
Cancel
Save