I noticed that many times auto-complete leads to a word with more than 1 character than the text typed. Thus you could use the old.length and new.length in order to say (of course not 100% accurately) that an auto-complete word was chosen.
However, from my experience, but I may be a bad typer, usually in small devices, I tend to make a lot of mistakes. Sure it is appropriate to spell the word before a punctuation sign?