mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-30 11:53:50 -07:00
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
This commit is contained in:
@@ -3100,6 +3100,10 @@ func (t *Terminal) Loop() {
|
|||||||
t.previewBox.Set(reqPreviewEnqueue,
|
t.previewBox.Set(reqPreviewEnqueue,
|
||||||
previewRequest{t.previewOpts.command, t.pwindow, t.evaluateScrollOffset(), list})
|
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:
|
case actTogglePreviewWrap:
|
||||||
|
Reference in New Issue
Block a user