summaryrefslogtreecommitdiff
path: root/indra/llui/llemojihelper.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2022-11-08 00:16:58 +0100
committerKitty Barnett <develop@catznip.com>2022-11-08 01:05:01 +0100
commit81dd143d0d901e8e5234cff01fbda246e4621628 (patch)
tree948c765937ce5ebe57bb98115e8d6efa754c60c6 /indra/llui/llemojihelper.cpp
parentec6c4f102f8b23e0c79dd2c1c0ecbad54f019566 (diff)
[FIXED] Various minor issues
- Typing :+1: doesn't replace the short code with the thumbs-up emoji - Moving the mouse over the emoji complete panel highlights the wrong emoji when mScrollPos > 0 - Emoji complete panel is missing attributes - Crash when attempting to show the tooltip for an emoji text segment - Emoji autocomplete panel can sometimes show empty (type ':cat', select the heart eyed one, Ctrl-Z and then type 2 which should show the emoji for :cat2 but shows an empty square instead)
Diffstat (limited to 'indra/llui/llemojihelper.cpp')
-rw-r--r--indra/llui/llemojihelper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp
index 32471e59a8..1e4c19a183 100644
--- a/indra/llui/llemojihelper.cpp
+++ b/indra/llui/llemojihelper.cpp
@@ -57,7 +57,8 @@ bool LLEmojiHelper::isActive(const LLUICtrl* ctrl_p) const
// static
bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S32* pShortCodePos)
{
- S32 shortCodePos = cursorPos;
+ // If the cursor is currently on a colon start the check one character further back
+ S32 shortCodePos = (cursorPos == 0 || L':' != wtext[cursorPos - 1]) ? cursorPos : cursorPos - 1;
auto isPartOfShortcode = [](llwchar ch) {
switch (ch)