mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-31 12:23:50 -07:00
Run preview command when preview window appears after resize (#3113)
# Start fzf in a small screen so that the preview window is hidden fzf --bind 'ctrl-p:toggle-preview' --preview 'stat {}' --preview-window='right,50%,<100(down,50%,hidden)' # Enlarge the screen until the preview window appears. It should not be empty.
This commit is contained in:
@@ -2622,7 +2622,11 @@ func (t *Terminal) Loop() {
|
|||||||
t.tui.Resume(t.fullscreen, t.sigstop)
|
t.tui.Resume(t.fullscreen, t.sigstop)
|
||||||
t.redraw()
|
t.redraw()
|
||||||
case reqFullRedraw:
|
case reqFullRedraw:
|
||||||
|
wasHidden := t.pwindow == nil
|
||||||
t.redraw()
|
t.redraw()
|
||||||
|
if wasHidden && t.pwindow != nil {
|
||||||
|
refreshPreview(t.previewOpts.command)
|
||||||
|
}
|
||||||
case reqClose:
|
case reqClose:
|
||||||
exit(func() int {
|
exit(func() int {
|
||||||
if t.output() {
|
if t.output() {
|
||||||
|
Reference in New Issue
Block a user