Fix code completion isIncomplete handling.

isIncomplete would not be set to true when there was no filter text but we elided entries.
This commit is contained in:
Jacob Dufault 2017-09-26 21:44:56 -07:00
parent 084d5c8d91
commit 80df5beee5

View File

@ -454,20 +454,18 @@ void FilterCompletionResponse(Out_TextDocumentComplete* complete_response,
}
complete_response->result.items = filtered_result;
}
// Assuming the client does not support out-of-order completion (ie, ao
// matches against oa), our filtering is guaranteed to contain any
// potential matches, so the completion is only incomplete if we have the
// max number of emitted matches.
// TODO: This is currently disabled, as it seems to be missing some
// results, esp with global completion.
if (true || filtered_result.size() >= kMaxResultSize) {
if (complete_response->result.items.size() >= kMaxResultSize) {
LOG_S(INFO) << "Marking completion results as incomplete";
complete_response->result.isIncomplete = true;
}
}
}
}
struct Index_Request {
std::string path;