From 38168bbfc43860ab241d60fd53d991e6c38e0266 Mon Sep 17 00:00:00 2001 From: Subhraman Sarkar Date: Fri, 14 Mar 2025 16:43:36 +0530 Subject: [PATCH] ci searcher: same search behavior as 1.18 fixup of c7db03fa043ef763f9b0d51555a141d16c57f03d --- src/utils/ci_searcher.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/utils/ci_searcher.hpp b/src/utils/ci_searcher.hpp index 38ab9e2600f..763eb3696a0 100644 --- a/src/utils/ci_searcher.hpp +++ b/src/utils/ci_searcher.hpp @@ -41,13 +41,16 @@ inline auto make_ci_matcher(const std::vector& keywords) return true; } + bool matched = false; for(const auto& keyword : keywords) { - if (translation::ci_search(keyword, text)) { - return true; + bool matched2 = true; + for(const auto& word : utils::split(text, ' ')) { + matched2 = matched2 && translation::ci_search(keyword, word); } + matched = matched || matched2; } - return false; + return matched; }; }