diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-01 13:53:34 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-01 13:53:34 +0900 |
commit | b7c2e8cb678d12c73c497fdec5c0cad8f32a6814 (patch) | |
tree | b83f4c096ed8b12dc1b36fe7eb9baf78bdc4325d /src/core.go | |
parent | fb76893e18fd567ac45a516f708832ae0f2ad37c (diff) |
Fix caching when reload and query change triggered by the same binding
Diffstat (limited to 'src/core.go')
-rw-r--r-- | src/core.go | 3 |
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 |