diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-08-15 01:10:41 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-08-15 01:10:41 +0900 |
commit | 0d171ba1d81886c6f9caf61867129e6daa268cd6 (patch) | |
tree | e82b6b40439ff4f6fc936f31e65790d976ccddb6 /src/pattern.go | |
parent | 2069bbc8b54fa77384e42274ee15af7b397af884 (diff) |
Remove special nilItem
Diffstat (limited to 'src/pattern.go')
-rw-r--r-- | src/pattern.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pattern.go b/src/pattern.go index 8de15b98..94615add 100644 --- a/src/pattern.go +++ b/src/pattern.go @@ -278,8 +278,8 @@ func (p *Pattern) matchChunk(chunk *Chunk, space []Result, slab *util.Slab) []Re matches := []Result{} if space == nil { - for idx := range *chunk { - if match, _, _ := p.MatchItem(&(*chunk)[idx], false, slab); match != nil { + for idx := 0; idx < chunk.count; idx++ { + if match, _, _ := p.MatchItem(&chunk.items[idx], false, slab); match != nil { matches = append(matches, *match) } } |