diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2016-08-20 02:06:57 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-08-20 02:06:57 +0900 |
| commit | f8fdf9618adf831b614a9b69e90eca53b9e37a28 (patch) | |
| tree | c08b729b15dc157eb3fe3df1da3b434885df4ec8 /src/pattern.go | |
| parent | 827a83efbc178390ddd8aaa36d26bce593d0d58f (diff) | |
| download | fzf-f8fdf9618adf831b614a9b69e90eca53b9e37a28.tar.gz | |
No need to cache the result in filtering mode (--filter)
Diffstat (limited to 'src/pattern.go')
| -rw-r--r-- | src/pattern.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pattern.go b/src/pattern.go index ef148267..faafa0b2 100644 --- a/src/pattern.go +++ b/src/pattern.go @@ -75,7 +75,7 @@ func clearChunkCache() { // BuildPattern builds Pattern object from the given arguments func BuildPattern(fuzzy bool, extended bool, caseMode Case, forward bool, - nth []Range, delimiter Delimiter, runes []rune) *Pattern { + cacheable bool, nth []Range, delimiter Delimiter, runes []rune) *Pattern { var asString string if extended { @@ -89,7 +89,7 @@ func BuildPattern(fuzzy bool, extended bool, caseMode Case, forward bool, return cached } - caseSensitive, cacheable := true, true + caseSensitive := true termSets := []termSet{} if extended { @@ -99,7 +99,7 @@ func BuildPattern(fuzzy bool, extended bool, caseMode Case, forward bool, for idx, term := range termSet { // If the query contains inverse search terms or OR operators, // we cannot cache the search scope - if idx > 0 || term.inv { + if !cacheable || idx > 0 || term.inv { cacheable = false break Loop } |
