If the option hint is set to "select" then the case of the entered characters remains the same regardless of the case of the word it is being matched to.
My suggestion for a fix is to change this in line 144:
var text = options.hint == "select" ? value : [...]
To this:
var text = options.hint == "select" ? value.slice(0, -word.length) + word : [...]