mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-16 13:48:04 +00:00
Fix PriorityEnqueue; use it when saving a file so index results come in faster for actively edited files.
This commit is contained in:
parent
a587022643
commit
61aaf4509c
@ -1541,7 +1541,7 @@ bool QueryDbMainLoop(
|
||||
WorkingFile* working_file = working_files->GetFileByFilename(path);
|
||||
if (working_file && !working_file->pending_new_index_content) {
|
||||
working_file->pending_new_index_content = working_file->buffer_content;
|
||||
queue_do_index->Enqueue(Index_DoIndex(Index_DoIndex::Type::Parse, project->FindCompilationEntryForFile(path)));
|
||||
queue_do_index->PriorityEnqueue(Index_DoIndex(Index_DoIndex::Type::Parse, project->FindCompilationEntryForFile(path)));
|
||||
}
|
||||
completion_manager->UpdateActiveSession(path);
|
||||
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
|
||||
bool IsEmpty() {
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
return queue_.empty();
|
||||
return priority_.empty() && queue_.empty();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user