m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 15:23:48 -05:00

Ignore EvtReadNew if EvtReadFin is already set

This commit is contained in:
Junegunn Choi
2017-08-20 14:29:50 +09:00
parent 941b0a0ff7
commit 55ee4186aa
2 changed files with 3 additions and 8 deletions

View File

@@ -188,7 +188,6 @@ func Run(opts *Options, revision string) {
if opts.Sync {
eventBox.Unwatch(EvtReadNew)
eventBox.WaitFor(EvtReadFin)
eventBox.Unset(EvtReadNew)
}
// Go interactive
@@ -210,6 +209,9 @@ func Run(opts *Options, revision string) {
delay := true
ticks++
eventBox.Wait(func(events *util.Events) {
if _, fin := (*events)[EvtReadFin]; fin {
delete(*events, EvtReadNew)
}
for evt, value := range *events {
switch evt {