richedit: Make the ME_GetCursorOfs function more flexible.