Ensure SemanticIndex::search waits for indexing to complete

This commit is contained in:
Antonio Scandurra 2023-09-06 11:40:59 +02:00
parent c802680084
commit de0f53b39f
3 changed files with 307 additions and 218 deletions

View file

@ -635,7 +635,9 @@ impl ProjectSearchView {
let project = self.model.read(cx).project.clone();
let mut pending_file_count_rx = semantic_index.update(cx, |semantic_index, cx| {
semantic_index.index_project(project.clone(), cx);
semantic_index
.index_project(project.clone(), cx)
.detach_and_log_err(cx);
semantic_index.pending_file_count(&project).unwrap()
});