My assumption is that we would do the same thing that we would do if we were handling an ordinary insertion from the code hint list, which would be to only insert the characters after the matched text.

(Also, I don't think the pending text is asynchronous--it's already been synchronously inserted by CodeMirror. What's asynchronous is the provider's response to the text changes. Unless I'm misunderstanding how the code hint stuff works.)