mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-05 06:32:09 -07:00
Fix incorrect cache reference in --exact mode (#547)
When we prepend a single quote to our query in --exact mode, we are not supposed to limit the scope of the new search to the previous exact-match result.
This commit is contained in:
@@ -227,7 +227,7 @@ func (p *Pattern) CacheKey() string {
|
||||
}
|
||||
cacheableTerms := []string{}
|
||||
for _, termSet := range p.termSets {
|
||||
if len(termSet) == 1 && !termSet[0].inv {
|
||||
if len(termSet) == 1 && !termSet[0].inv && (p.fuzzy || termSet[0].typ == termExact) {
|
||||
cacheableTerms = append(cacheableTerms, string(termSet[0].origText))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user