From b7c2e8cb678d12c73c497fdec5c0cad8f32a6814 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 1 May 2023 13:53:34 +0900 Subject: Fix caching when reload and query change triggered by the same binding --- src/core.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core.go') diff --git a/src/core.go b/src/core.go index d4c06f9f..042d863f 100644 --- a/src/core.go +++ b/src/core.go @@ -320,15 +320,16 @@ func Run(opts *Options, version string, revision string) { if !changed { break } + reset := false if !useSnapshot { newSnapshot, _ := chunkList.Snapshot() // We want to avoid showing empty list when reload is triggered // and the query string is changed at the same time i.e. command != nil && changed if command == nil || len(newSnapshot) > 0 { snapshot = newSnapshot + reset = clearCache() } } - reset := !useSnapshot && clearCache() matcher.Reset(snapshot, input(reset), true, !reading, sort, reset) delay = false -- cgit v1.2.3