Auto merge of #2989 - micbou:no-omnifunc-suggestions-if-server-crashed, r=puremourning

[READY] Do not return omnifunc suggestions if server crashed

We currently return unfiltered and unsorted suggestions from the omnifunc if the `filter_and_sort_candidates` request failed (generally because the server crashed). This behavior is confusing as it may let the user thinks that YCM is working (in a bad way) while in fact it doesn't. No suggestions should be returned in that case.

<!-- 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/2989)
<!-- Reviewable:end -->
This commit is contained in:
zzbot 2018-04-22 09:31:14 -07:00 committed by GitHub
commit e7772347cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,4 +130,4 @@ class OmniCompleter( Completer ):
response = BaseRequest.PostDataToHandler( request_data,
'filter_and_sort_candidates' )
return response if response is not None else candidates
return response if response is not None else []