Remove Offset slice from Result struct

This commit is contained in:
Junegunn Choi
2016-08-20 01:46:54 +09:00
parent 3e88849386
commit 827a83efbc
9 changed files with 55 additions and 46 deletions

View File

@@ -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}