95efbc8766
[READY] Handle null characters in completion response The `detailed_info` field may contain null characters e.g. `\x00` in Python docstrings (though it doesn't make sense to use such characters in a docstring). Since these characters cannot be evaluated through `pyeval` (and `py3eval`), we replace them with the symbol used by Vim to display them (`^@`). This PR also rewrites the `_ConvertCompletionDataToVimData` function by relying on two things: - [the `insertion_text` field is always defined](600f54de20/ycmd/responses.py (L109)
); - [Vim ignores fields with an empty string](833e5dab14/src/edit.c (L2748-L2755)
). I did some measurements and the performance hit is negligible. Fixes #3207. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3208) <!-- Reviewable:end -->