From 2c591b1429f44795aceebd5c6f5ea6907b2a08ea Mon Sep 17 00:00:00 2001 From: gwigz Date: Thu, 18 Jun 2026 22:04:45 +0100 Subject: #5928 Gesture auto-complete, similar to emojis/mentions --- indra/llui/lltexteditor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/llui/lltexteditor.cpp') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 7689b93374..5f1302df88 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -61,6 +61,7 @@ #include "lltooltip.h" #include "llmenugl.h" #include "llchatmentionhelper.h" +#include "llgestureautocompletehelper.h" #include #include "llcombobox.h" @@ -1950,7 +1951,8 @@ bool LLTextEditor::handleKeyHere(KEY key, MASK mask ) // not handled and let the parent take care of field movement. if (KEY_TAB == key && mTabsToNextField) { - return mShowChatMentionPicker && LLChatMentionHelper::instance().handleKey(this, key, mask); + return (mShowChatMentionPicker && LLChatMentionHelper::instance().handleKey(this, key, mask)) + || LLGestureAutocompleteHelper::instance().handleKey(this, key, mask); } if (mReadOnly && mScroller) @@ -1964,7 +1966,8 @@ bool LLTextEditor::handleKeyHere(KEY key, MASK mask ) if (!mReadOnly) { if ((mShowEmojiHelper && LLEmojiHelper::instance().handleKey(this, key, mask)) || - (mShowChatMentionPicker && LLChatMentionHelper::instance().handleKey(this, key, mask))) + (mShowChatMentionPicker && LLChatMentionHelper::instance().handleKey(this, key, mask)) || + LLGestureAutocompleteHelper::instance().handleKey(this, key, mask)) { return true; } -- cgit v1.3 From a402fd4da91bbce03340e174505c06feede65866 Mon Sep 17 00:00:00 2001 From: VolkSec Date: Mon, 24 Aug 2026 16:02:10 -0300 Subject: #5871 Handle trailing line breaks when pasting text (#6069) Signed-off-by: Luan Nutels - VolkSec --- indra/llui/lltexteditor.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/llui/lltexteditor.cpp') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 5f1302df88..6588c481ff 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1693,28 +1693,25 @@ void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string) std::basic_string::size_type start = 0; std::basic_string::size_type pos = clean_string.find('\n',start); - while((pos != -1) && (pos != clean_string.length() -1)) + while (pos != std::basic_string::npos) { - if(pos!=start) + if (pos != start) { std::basic_string str = std::basic_string(clean_string,start,pos-start); setCursorPos(mCursorPos + insert(mCursorPos, str, true, LLTextSegmentPtr())); } - addLineBreakChar(true); // Add a line break and group with the next addition. + const bool trailing_linebreak = (pos == clean_string.length() - 1); + addLineBreakChar(!trailing_linebreak); start = pos+1; pos = clean_string.find('\n',start); } - if (pos != start) + if (start < clean_string.length()) { std::basic_string str = std::basic_string(clean_string,start,clean_string.length()-start); setCursorPos(mCursorPos + insert(mCursorPos, str, false, LLTextSegmentPtr())); } - else - { - addLineBreakChar(false); // Add a line break and end the grouping. - } } // copy selection to primary -- cgit v1.3