Okay... I fixed it.
I pasted the code here: http://www.rafb.net/paste/results/6meYuW68.html
This code modifies the CodeCompletionWindow to listen for IDocument's DocumentAboutToBeChanged events. This basically reliefs CodeCompletionWindow from the need to replicate the key handling code from the text editor control (etc, backspace, delete, deleteword, wordbackspace, ctrl+backspace, and etc). In addition, using the mouse to highlight and delete the text within the offset window will also trigger and update to the endOffset appropriately.
Note: rafb.net is a public code pasting service.
Sorry for not generating a svn diff file. I'm not familiar with it yet.
Regards,
David