summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) == "%%")