summaryrefslogtreecommitdiffstats
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-05-01 13:53:34 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-05-01 13:53:34 +0900
commitb7c2e8cb678d12c73c497fdec5c0cad8f32a6814 (patch)
treeb83f4c096ed8b12dc1b36fe7eb9baf78bdc4325d /src/core.go
parentfb76893e18fd567ac45a516f708832ae0f2ad37c (diff)
Fix caching when reload and query change triggered by the same binding
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go3
1 files changed, 2 insertions, 1 deletions
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