Remove invalid 'result' event when using --sync option

When the search for the initial query doesn't finish immediately
fzf would trigger an invalid 'result' event for an empty query.

  seq 100 | fzf --query 99 --bind result:accept --sync
    # Prints 99

  seq 1000000 | fzf --query 99 --bind result:accept --sync
    # Should print 99, but fzf would print 1
This commit is contained in:
Junegunn Choi
2024-04-20 14:40:48 +09:00
parent f864f8b5f7
commit d8bfb6712d
3 changed files with 5 additions and 6 deletions

View File

@@ -812,7 +812,7 @@ e.g.
.TP
.B "--sync"
Synchronous search for multi-staged filtering. If specified, fzf will launch
ncurses finder only after the input stream is complete.
the finder only after the input stream is complete.
.RS
e.g. \fBfzf --multi | fzf --sync\fR