diff --git a/src/messages/text_document_completion.cc b/src/messages/text_document_completion.cc index 1b43f4ec..019d5767 100644 --- a/src/messages/text_document_completion.cc +++ b/src/messages/text_document_completion.cc @@ -303,14 +303,14 @@ struct TextDocumentCompletionHandler : MessageHandler { out.result.items = results; // Emit completion results. - if (existing_completion.size()==0 && is_global_completion) { + if (existing_completion.empty() && is_global_completion) { LOG_S(INFO) << "Existing completion is empty, no completion results will be returned"; Out_TextDocumentComplete out; out.id = request->id; QueueManager::WriteStdout(IpcId::TextDocumentCompletion, out); return; } - + SortAndFilterCompletionResponse(&out, existing_completion); QueueManager::WriteStdout(IpcId::TextDocumentCompletion, out);