mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 09:50:26 +00:00
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:
parent
084d5c8d91
commit
80df5beee5
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user