From 87874bba88c315b11ce5da37c178e6fdedb8708a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 20 Aug 2017 01:58:51 +0900 Subject: Remove redundant read event when --sync is used --- src/core.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core.go') 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: -- cgit v1.2.3