From c496a34f57021d7ab5cd9b9d5048a0f45bc242b4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 7 Nov 2018 14:12:36 +0400 Subject: [PATCH] Fix single accented letter suggestion in hashtags. Fixes #5335. --- Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp index 31fa50d76..cc94d3186 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp @@ -232,7 +232,11 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) { auto &recent(cRecentWriteHashtags()); hrows.reserve(recent.size()); for (auto i = recent.cbegin(), e = recent.cend(); i != e; ++i) { - if (!listAllSuggestions && (!i->first.startsWith(_filter, Qt::CaseInsensitive) || i->first.size() == _filter.size())) { + if (!listAllSuggestions + && (i->first.size() == _filter.size() + || !TextUtilities::RemoveAccents(i->first).startsWith( + _filter, + Qt::CaseInsensitive))) { continue; } hrows.push_back(i->first);