file-search: First search fails to show results because index is not yet built
The file-search plugin builds its index when a search is triggered from the search-button in the toolbar, the consequence of this is that the first search will fail, but subsequent ones will work, even if just modifying one single character.
I can reproduce this on master (fd338868) with the Builder repo.
test
does not show results because the index is not yet built, but changing the entry to tes
shows results because the index is now available
It seems the problem is that src/plugins/file-search/gbp-file-search-provider.c
: gbp_file_search_provider_search_async
, fails silently (returning 0 results) if no index is yet available:
68 if (self->index != NULL)
69 results = gbp_file_search_index_populate (self->index, search_terms, max_results);
70 else
71 results = g_ptr_array_new_with_free_func (g_object_unref);
Edited by Diego Escalante Urrelo