This is to prevent NULL pointers when creating a TextService with no rows in it.
This NULL pointers doesn't happen when creating a richedit windows, because
it sets an empty text when the richedit window procedure handles the WM_CREATE event.
--
v7: riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941
First we set the EOS state, so the wait_parser_stream_buffer function doesn't
call pthread_cond_wait again. Then we must call pthread_cond_signal to make sure
that no one is waiting for it, if we don't do that, there is the possibility of
hanging wg_parser_disconnect at the free_stream call, because pthread_cond_destroy
will hang when the cond object is being waited by other threads.
Specifically this helps to fix a hang in some applications, specially Unreal Engine
games when changing sources too fast in a MediaPlayer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2887