summaryrefslogtreecommitdiffstats
path: root/src/pattern.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-07-15 12:28:29 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-07-16 23:34:32 +0900
commitd4f3d5a16423fbf039644f04516c052d1654326c (patch)
tree2cb3f9519a23e9e9c162d135636d9f99373deadc /src/pattern.go
parent7b5ccc45bc76f289fe2c48cf91e895b9ca99b1e2 (diff)
Remove pointer indirection by changing Chunk definition
Diffstat (limited to 'src/pattern.go')
-rw-r--r--src/pattern.go4
1 files changed, 2 insertions, 2 deletions
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)
}
}