Skip to content

Commit

Permalink
Merge pull request #7 from chriswalz/master
Browse files Browse the repository at this point in the history
 fix index out of range when quickly typing and or changing suggestions
  • Loading branch information
Verseth authored Jul 1, 2023
2 parents 5d8962c + ca52eb9 commit 3bdfd29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func (c *CompletionManager) GetSelectedSuggestion() (s Suggest, ok bool) {
debug.Assert(false, "must not reach here")
c.selected = -1
return Suggest{}, false
} else if c.selected >= len(c.tmp) {
return Suggest{}, false
}
return c.tmp[c.selected], true
}
Expand Down

0 comments on commit 3bdfd29

Please sign in to comment.