summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-18 00:03:47 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-18 00:03:47 +0300
commitbc22bc4da27d80627fa966660670219b3652e9ec (patch)
tree5a829469a5464c6032fabbc78c765a8ce887e30e /src/gui/widgets
parenteaa036561c6a504fcc5e3e524c4b785c0c1ad9b4 (diff)
downloadplus-bc22bc4da27d80627fa966660670219b3652e9ec.tar.gz
plus-bc22bc4da27d80627fa966660670219b3652e9ec.tar.bz2
plus-bc22bc4da27d80627fa966660670219b3652e9ec.tar.xz
plus-bc22bc4da27d80627fa966660670219b3652e9ec.zip
Fix wrong decoding colors and emotes in same line.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp8
1 files 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
@@ -738,6 +736,12 @@ int BrowserBox::calcHeight()
}
}
if (mUseEmotes)
+ idx2 = row.find("%%", start + 1);
+ if (idx1 < idx2)
+ end = idx1;
+ else
+ end = idx2;
+ if (mUseEmotes)
{
// check for emote icons
if (row.size() > start + 2 && row.substr(start, 2) == "%%")