diff --git a/src/main.cpp b/src/main.cpp index 4a49953..46767fc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -204,6 +204,14 @@ int main(int argc, char *argv[]) } futurepool.emplace_back( std::async(std::launch::async, search_file, filepath)); + + if (!matches_all.empty()) + { + output::print_matches(matches_all[0], opts, + input_files.size() == 1); + std::lock_guard guard(mutex_matches_all); + matches_all.erase(matches_all.begin()); + } } futures_cleanup(true);