diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-18 00:03:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-18 00:03:47 +0300 |
commit | bc22bc4da27d80627fa966660670219b3652e9ec (patch) | |
tree | 5a829469a5464c6032fabbc78c765a8ce887e30e /src/gui | |
parent | eaa036561c6a504fcc5e3e524c4b785c0c1ad9b4 (diff) | |
download | manaverse-bc22bc4da27d80627fa966660670219b3652e9ec.tar.gz manaverse-bc22bc4da27d80627fa966660670219b3652e9ec.tar.bz2 manaverse-bc22bc4da27d80627fa966660670219b3652e9ec.tar.xz manaverse-bc22bc4da27d80627fa966660670219b3652e9ec.zip |
Fix wrong decoding colors and emotes in same line.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 8 |
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) == "%%") |