Improve comments

This commit is contained in:
Zachary Yedidia
2021-08-21 17:58:30 -04:00
parent 0c2e139672
commit 0914f158c2
4 changed files with 43 additions and 13 deletions

View File

@@ -91,10 +91,10 @@ func (b *Buffer) findUp(r *regexp.Regexp, start, end Loc) ([2]Loc, bool) {
l = util.SliceStart(l, end.X)
}
all_matches := r.FindAllIndex(l, -1)
allMatches := r.FindAllIndex(l, -1)
if all_matches != nil {
match := all_matches[len(all_matches)-1]
if allMatches != nil {
match := allMatches[len(allMatches)-1]
start := Loc{charpos + util.RunePos(l, match[0]), i}
end := Loc{charpos + util.RunePos(l, match[1]), i}
return [2]Loc{start, end}, true