Skip to content

Commit

Permalink
use range-over-int
Browse files Browse the repository at this point in the history
  • Loading branch information
fzipp committed Feb 12, 2024
1 parent 6ad418a commit 3a9fc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type defsProvider interface {
func makeCompleter(def defsProvider) liner.WordCompleter {
return func(line string, pos int) (head string, completions []string, tail string) {
idx := 0
for i := 0; i < pos; i++ {
for range pos {
_, width := utf8.DecodeRuneInString(line[idx:])
idx += width
}
Expand Down

0 comments on commit 3a9fc33

Please sign in to comment.