mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-05 22:52:06 -07:00
Fix caching when reload and query change triggered by the same binding
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user