From bc22bc4da27d80627fa966660670219b3652e9ec Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 18 Jan 2015 00:03:47 +0300 Subject: Fix wrong decoding colors and emotes in same line. --- src/gui/widgets/browserbox.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 3ef7d9d38..fe99d5f89 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -621,8 +621,6 @@ int BrowserBox::calcHeight() // "Tokenize" the string at control sequences if (mUseLinksAndUserColors) idx1 = row.find("##", start + 1); - if (mUseEmotes) - idx2 = row.find("%%", start + 1); if (idx1 < idx2) end = idx1; else @@ -737,6 +735,12 @@ int BrowserBox::calcHeight() break; } } + if (mUseEmotes) + idx2 = row.find("%%", start + 1); + if (idx1 < idx2) + end = idx1; + else + end = idx2; if (mUseEmotes) { // check for emote icons -- cgit v1.2.3-70-g09d2