diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-04-15 13:55:01 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-04-15 13:55:01 -0400 |
| commit | 52cca995ccc30ac5aa989588a71c0a7f4a9804ae (patch) | |
| tree | 69aecdda91f34883bf38ac86eefe8df61b1c4f22 /indra/llui/lltexteditor.cpp | |
| parent | 97085ed30057ce950184f057340e0ecbcfc7614b (diff) | |
| parent | e43baa755d9b91c029e7b5166317e76468baf896 (diff) | |
Merge branch 'release/2025.04' into rye/forevermac
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3537c764b9..fe4cce29ab 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -209,8 +209,15 @@ public: } virtual bool execute( LLTextBase* editor, S32* delta ) { - mWString = editor->getWText().substr(getPosition(), mLen); - *delta = remove(editor, getPosition(), mLen ); + try + { + mWString = editor->getWText().substr(getPosition(), mLen); + *delta = remove(editor, getPosition(), mLen); + } + catch (std::out_of_range&) + { + return false; + } return (*delta != 0); } virtual S32 undo( LLTextBase* editor ) @@ -1211,6 +1218,14 @@ void LLTextEditor::showEmojiHelper() LLEmojiHelper::instance().showHelper(this, cursorRect.mLeft, cursorRect.mTop, LLStringUtil::null, cb); } +void LLTextEditor::hideEmojiHelper() +{ + if (mShowEmojiHelper) + { + LLEmojiHelper::instance().hideHelper(this); + } +} + void LLTextEditor::tryToShowEmojiHelper() { if (mReadOnly || !mShowEmojiHelper) |
