Let emoji suggestions be case insensitive

Closes #3985
This commit is contained in:
Patrick Eigensatz 2018-02-18 15:28:36 +01:00 committed by John Preston
parent bb35d71fdc
commit dd1beb1d91
1 changed files with 2 additions and 2 deletions

View File

@ -401,7 +401,7 @@ QString SuggestionsController::getEmojiQuery() {
}
position -= from;
_queryStartPosition = from;
return fragment.text();
return fragment.text().toLower();
}
return QString();
};
@ -412,7 +412,7 @@ QString SuggestionsController::getEmojiQuery() {
}
auto isSuggestionChar = [](QChar ch) {
return (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || (ch == '_') || (ch == '-') || (ch == '+');
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '_') || (ch == '-') || (ch == '+');
};
auto isGoodCharBeforeSuggestion = [isSuggestionChar](QChar ch) {
return !isSuggestionChar(ch) || (ch == 0);