From c4a4e99f6b6a4e03cd4c01da7e875ebd3d6fbfbb Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 20 Sep 2016 17:02:50 +0300 Subject: [PATCH] Version 0.10.7: fixed entities moving when replacing emoji. --- Telegram/SourceFiles/ui/emoji_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/emoji_config.h b/Telegram/SourceFiles/ui/emoji_config.h index 955811f11c..a863a51fac 100644 --- a/Telegram/SourceFiles/ui/emoji_config.h +++ b/Telegram/SourceFiles/ui/emoji_config.h @@ -173,7 +173,7 @@ inline void appendPartToResult(QString &result, const QChar *start, const QChar if (entity.offset() >= from - start) { entity.extendToLeft(from - start - result.size()); } - if (entity.offset() + entity.length() < to - start) { + if (entity.offset() + entity.length() <= to - start) { entity.shrinkFromRight(from - start - result.size()); } }