From d4f3d5a16423fbf039644f04516c052d1654326c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 15 Jul 2017 12:28:29 +0900 Subject: Remove pointer indirection by changing Chunk definition --- src/pattern.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pattern.go') diff --git a/src/pattern.go b/src/pattern.go index 4614e079..05b03b9e 100644 --- a/src/pattern.go +++ b/src/pattern.go @@ -281,8 +281,8 @@ func (p *Pattern) matchChunk(chunk *Chunk, space []*Result, slab *util.Slab) []* matches := []*Result{} if space == nil { - for _, item := range *chunk { - if match, _, _ := p.MatchItem(item, false, slab); match != nil { + for idx := range *chunk { + if match, _, _ := p.MatchItem(&(*chunk)[idx], false, slab); match != nil { matches = append(matches, match) } } -- cgit v1.2.3