summaryrefslogtreecommitdiff
path: root/indra/llui/llemojihelper.cpp
diff options
context:
space:
mode:
authorTommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>2024-08-02 06:33:00 -0400
committerGitHub <noreply@github.com>2024-08-02 13:33:00 +0300
commita134e850c1800a0dd5a40ddf714bce94ed0dc7d8 (patch)
tree93f7f7a0c274cc2a8bcded3818d1923f8cabe5cb /indra/llui/llemojihelper.cpp
parentf08b3f2046e9f72369c36fe39e71ced5d1943e8c (diff)
Disable EmojiHelper if Digit before Colon (#2178)
* Disable EmojiHelper if Digit before Colon Typing in times with the new emoji helper pop-up can be frustrating, so I would like to propose disabling it when there is a number before the colon. * Remove trailing space in indra/llui/llemojihelper.cpp --------- Co-authored-by: Andrey Lihatskiy <alihatskiy@productengine.com>
Diffstat (limited to 'indra/llui/llemojihelper.cpp')
-rw-r--r--indra/llui/llemojihelper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp
index fbe313924c..b9441a9c91 100644
--- a/indra/llui/llemojihelper.cpp
+++ b/indra/llui/llemojihelper.cpp
@@ -76,7 +76,9 @@ bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S
shortCodePos--;
}
- bool isShortCode = (L':' == wtext[shortCodePos - 1]) && (cursorPos - shortCodePos >= 2);
+ bool isShortCode = (cursorPos - shortCodePos >= 2) && (L':' == wtext[shortCodePos - 1]);
+ if(isShortCode && (shortCodePos >= 2) && isdigit(wtext[shortCodePos - 2])) // <TS:3T> Add qualifier to avoid emoji pop-up when typing times.
+ isShortCode = false;
if (pShortCodePos)
*pShortCodePos = (isShortCode) ? shortCodePos - 1 : -1;
return isShortCode;