YouCompleteMe/python/ycm/client
zzbot 95efbc8766
Auto merge of #3208 - micbou:null-character-completion, r=micbou
[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 -->
2018-11-17 05:23:42 -08:00
..
__init__.py A (barely) working version of ycmd + client 2013-10-07 11:03:26 -07:00
base_request.py Reduce logging verbosity when a connection error occurs 2018-09-24 11:08:07 +02:00
command_request.py Ignore ft= argument from YcmCompleter command 2018-09-28 01:12:23 +02:00
completer_available_request.py Refactor server exception handling 2018-04-13 01:35:17 +02:00
completion_request.py Auto merge of #3208 - micbou:null-character-completion, r=micbou 2018-11-17 05:23:42 -08:00
debug_info_request.py Add flake8-ycm to test requirements 2018-05-30 02:53:28 +02:00
event_notification.py Refactor server exception handling 2018-04-13 01:35:17 +02:00
messages_request.py Refactor server exception handling 2018-04-13 01:35:17 +02:00
omni_completion_request.py Recompute starting column on auto-wrapping 2018-11-17 01:07:02 +01:00
shutdown_request.py Fix shutdown request initialization 2018-04-24 15:49:50 +02:00
ycmd_keepalive.py Resend request when extra conf is loaded or ignored 2018-04-22 22:10:14 +02:00