Since we're discussing character selection in edit controls, let me throw this into the mix.
After creating and using my own editor, which also uses a RichEdit control, I'm finding some things I really do not like about those controls. Chief among them is some weirdness concerning character selection. Specifically, what happens when you're selecting text at the end of a line.
Compare the two images below. In both I'm selecting text ("EDI") at the end of a line; ain't nothing past that text but a carriage return/line feed pair. But for some strange reason. RichEdit lets you select one character past the end of line, which ends up including a space after the last character. Which means that any searches on this string will only succeed if that text is at the end of line as well. (So does that makes this a feature instead of a bug? I don't think so.)
And sometimes it's difficult to select just that text and not that extra space at the end. Compare to a regular (non-RichEdit) edit control, where the end of line is the end of line and that's that. Obviously the team that created this control made some compromises, and this is one of them.