mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-27 18:11:57 +00:00
Fix missing include completions.
This commit is contained in:
parent
7ff4a9aac9
commit
e235dbedfe
@ -303,15 +303,12 @@ struct Handler_TextDocumentCompletion : MessageHandler {
|
|||||||
include_complete->completion_items_mutex, std::defer_lock);
|
include_complete->completion_items_mutex, std::defer_lock);
|
||||||
if (include_complete->is_scanning)
|
if (include_complete->is_scanning)
|
||||||
lock.lock();
|
lock.lock();
|
||||||
std::string quote = result.match[5];
|
out.result.items = include_complete->completion_items;
|
||||||
for (auto& item : include_complete->completion_items)
|
|
||||||
if (quote.empty() || quote == (item.use_angle_brackets_ ? "<" : "\""))
|
|
||||||
out.result.items.push_back(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Needed by |FilterAndSortCompletionResponse|.
|
// Needed by |FilterAndSortCompletionResponse|.
|
||||||
for (lsCompletionItem& item : out.result.items)
|
for (lsCompletionItem& item : out.result.items)
|
||||||
item.filterText = item.label;
|
item.filterText = "include" + item.label;
|
||||||
|
|
||||||
FilterAndSortCompletionResponse(&out, result.pattern,
|
FilterAndSortCompletionResponse(&out, result.pattern,
|
||||||
config->completion.filterAndSort);
|
config->completion.filterAndSort);
|
||||||
|
Loading…
Reference in New Issue
Block a user