diff options
Diffstat (limited to 'src/core.go')
| -rw-r--r-- | src/core.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core.go b/src/core.go index 290c0af0..78dddc02 100644 --- a/src/core.go +++ b/src/core.go @@ -161,9 +161,11 @@ func Run(opts *Options) { reader := Reader{ func(runes []byte) bool { item := chunkList.trans(runes, 0) - if item != nil && pattern.MatchItem(item) != nil { - fmt.Println(item.text.ToString()) - found = true + if item != nil { + if result, _ := pattern.MatchItem(item); result != nil { + fmt.Println(item.text.ToString()) + found = true + } } return false }, eventBox, opts.ReadZero} |
