diff --git a/src/commands.cc b/src/commands.cc index 55becf4ad..1c6ea09ad 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -336,9 +336,12 @@ private: Completions rank_candidates(StringView query) { UsedLetters query_letters = used_letters(query); - auto matches = m_candidates | transform([&](const auto& c) { return RankedMatch{c.first, c.second, query, query_letters}; }) - | filter([](const auto& m) { return (bool)m; }) - | gather>(); + Vector matches; + for (auto&& candidate : m_candidates) + { + if (RankedMatch m{candidate.first, candidate.second, query, query_letters}) + matches.push_back(m); + } constexpr size_t max_count = 100; CandidateList res;