diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-04-24 03:30:51 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-04-24 03:43:24 +0900 |
commit | 85ef3263fcfe578aecdac2aecd6c949fed921a7f (patch) | |
tree | ba8ea198c1b9d97800c70177327620c2d0f518b8 /src/pattern.go | |
parent | 4bde8de63f187e487ff5bc40c1d7803ca882ff9c (diff) |
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.
Diffstat (limited to 'src/pattern.go')
-rw-r--r-- | src/pattern.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pattern.go b/src/pattern.go index fda5cc9a..42a341b4 100644 --- a/src/pattern.go +++ b/src/pattern.go @@ -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)) } } |