mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-30 10:05:58 +00:00
Ignore EvtReadNew if EvtReadFin is already set
This commit is contained in:
2 files changed
+3
-8
No files matched your search
+3
-1
@@ -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 {
|
||||
|
||||
|
||||
Reference in new issue
Block a user