diff options
author | Kitty Barnett <develop@catznip.com> | 2022-10-23 17:55:13 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2022-10-23 16:29:29 +0200 |
commit | fb1553d8cf704eeb222de7ebd520a81fa242b317 (patch) | |
tree | aa9b003c20e6a4dcab432568ea4b3ea186933de5 | |
parent | cb0bb91108b628e1134f1f655eaca9d305961cda (diff) |
Cannot use the :+1 emoji shortcode
-rw-r--r-- | indra/llui/llemojihelper.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp index 54c801ab7b..551f0331e7 100644 --- a/indra/llui/llemojihelper.cpp +++ b/indra/llui/llemojihelper.cpp @@ -59,8 +59,18 @@ bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S { S32 shortCodePos = cursorPos; - while (shortCodePos > 1 && - (LLStringOps::isAlnum(wtext[shortCodePos - 1]) || wtext[shortCodePos - 1] == L'-' || wtext[shortCodePos - 1] == L'_') ) + auto isPartOfShortcode = [](llwchar ch) { + switch (ch) + { + case L'-': + case L'_': + case L'+': + return true; + default: + return LLStringOps::isAlnum(ch); + } + }; + while (shortCodePos > 1 && isPartOfShortcode(wtext[shortCodePos - 1])) { shortCodePos--; } |