From 924ffb5a35d163de8324376b24e765062c2c0f86 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 31 Dec 2022 09:33:23 +0900 Subject: [PATCH] Fix cache being immediately cleared on reload-sync --- src/core.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.go b/src/core.go index c6ff3dc..0545c48 100644 --- a/src/core.go +++ b/src/core.go @@ -293,7 +293,7 @@ func Run(opts *Options, version string, revision string) { if heightUnknown && !deferred { determine(!reading) } - reset := clearCache() + reset := !useSnapshot && clearCache() matcher.Reset(snapshot, input(reset), false, !reading, sort, reset) case EvtSearchNew: @@ -318,7 +318,7 @@ func Run(opts *Options, version string, revision string) { if !useSnapshot { snapshot, _ = chunkList.Snapshot() } - reset := clearCache() + reset := !useSnapshot && clearCache() matcher.Reset(snapshot, input(reset), true, !reading, sort, reset) delay = false