Terminal: Fix case insensitive search

Case sensitive / case insensitive were set the wrong way around.

Change-Id: I7ed689684972aae5f6b1af2f35d9fd72d2df71e9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Marcus Tillmanns
2023-05-23 07:16:30 +02:00
parent ff09ebf4f2
commit 69c81e8a65

View File

@@ -99,12 +99,13 @@ QList<SearchHit> TerminalSearch::search()
std::function<bool(char32_t, char32_t)> compare;
if (m_findFlags.testFlag(Core::FindFlag::FindCaseSensitively))
if (m_findFlags.testFlag(Core::FindFlag::FindCaseSensitively)) {
compare = [](char32_t a, char32_t b) { return a == b || isSpace(a, b); };
} else {
compare = [](char32_t a, char32_t b) {
return std::tolower(a) == std::tolower(b) || isSpace(a, b);
};
else
compare = [](char32_t a, char32_t b) { return a == b || isSpace(a, b); };
}
if (!m_currentSearchString.isEmpty()) {
const QList<uint> asUcs4 = m_currentSearchString.toUcs4();