m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Remove unnecessary reader barrier on --filter mode

This commit is contained in:
Junegunn Choi
2019-11-11 12:53:03 +09:00
parent e975bd0c8d
commit 73c0a645e0
3 changed files with 14 additions and 11 deletions

View File

@@ -139,7 +139,7 @@ func Run(opts *Options, revision string) {
if !streamingFilter {
reader = NewReader(func(data []byte) bool {
return chunkList.Push(data)
}, eventBox, opts.ReadZero)
}, eventBox, opts.ReadZero, opts.Filter == nil)
go reader.ReadSource()
}
@@ -183,7 +183,7 @@ func Run(opts *Options, revision string) {
}
}
return false
}, eventBox, opts.ReadZero)
}, eventBox, opts.ReadZero, false)
reader.ReadSource()
} else {
eventBox.Unwatch(EvtReadNew)