diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-05-06 15:34:16 -0400 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-05-06 15:34:16 -0400 |
commit | d679e7f3bacd7bba5493257f0e6c1c2366bf960a (patch) | |
tree | b351be1516815a9ebd49bf57e86d7f7125537bec /indra/llui/llchatentry.cpp | |
parent | 47a5c7a41340a18d90a5a8724762ff32f9ac8afd (diff) | |
parent | 9180a110bd5b0e41f182c32017b5dccd2eb265be (diff) |
Merge branch 'release/2025.04' into geenz/gltf-mesh-import
Diffstat (limited to 'indra/llui/llchatentry.cpp')
-rw-r--r-- | indra/llui/llchatentry.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp index da5afd0386..7506cd99c0 100644 --- a/indra/llui/llchatentry.cpp +++ b/indra/llui/llchatentry.cpp @@ -45,12 +45,14 @@ LLChatEntry::LLChatEntry(const Params& p) mExpandLinesCount(p.expand_lines_count), mPrevLinesCount(0), mSingleLineMode(false), - mPrevExpandedLineCount(S32_MAX) + mPrevExpandedLineCount(S32_MAX), + mCurrentInput("") { // Initialize current history line iterator mCurrentHistoryLine = mLineHistory.begin(); mAutoIndent = false; + mShowChatMentionPicker = true; keepSelectionOnReturn(true); } @@ -189,6 +191,7 @@ bool LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) { needsReflow(); } + mCurrentInput = ""; break; case KEY_UP: @@ -196,6 +199,11 @@ bool LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) { if (!mLineHistory.empty() && mCurrentHistoryLine > mLineHistory.begin()) { + if (mCurrentHistoryLine == mLineHistory.end()) + { + mCurrentInput = getText(); + } + setText(*(--mCurrentHistoryLine)); endOfDoc(); } @@ -210,16 +218,15 @@ bool LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) case KEY_DOWN: if (mHasHistory && MASK_CONTROL == mask) { - if (!mLineHistory.empty() && mCurrentHistoryLine < (mLineHistory.end() - 1) ) + if (!mLineHistory.empty() && mCurrentHistoryLine < (mLineHistory.end() - 1)) { setText(*(++mCurrentHistoryLine)); endOfDoc(); } - else if (!mLineHistory.empty() && mCurrentHistoryLine == (mLineHistory.end() - 1) ) + else if (!mLineHistory.empty() && mCurrentHistoryLine == (mLineHistory.end() - 1)) { mCurrentHistoryLine++; - std::string empty(""); - setText(empty); + setText(mCurrentInput); needsReflow(); endOfDoc(); } |