summaryrefslogtreecommitdiffstats
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-08-20 01:58:51 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-08-20 01:58:51 +0900
commit87874bba88c315b11ce5da37c178e6fdedb8708a (patch)
tree05e00dc8f0550683dc02e02f7747c533c4bec44c /src/core.go
parentc304fc43333c95467394ca2d6e5eddbbcdf99e3d (diff)
Remove redundant read event when --sync is used
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core.go b/src/core.go
index 6bb4b2e7..1c8182ea 100644
--- a/src/core.go
+++ b/src/core.go
@@ -188,6 +188,7 @@ func Run(opts *Options, revision string) {
if opts.Sync {
eventBox.Unwatch(EvtReadNew)
eventBox.WaitFor(EvtReadFin)
+ eventBox.Unset(EvtReadNew)
}
// Go interactive
@@ -216,6 +217,9 @@ func Run(opts *Options, revision string) {
reading = reading && evt == EvtReadNew
snapshot, count := chunkList.Snapshot()
terminal.UpdateCount(count, !reading, value.(bool))
+ if opts.Sync {
+ terminal.UpdateList(PassMerger(&snapshot, opts.Tac))
+ }
matcher.Reset(snapshot, terminal.Input(), false, !reading, sort)
case EvtSearchNew: