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