summaryrefslogtreecommitdiff
path: root/indra/llui/lllineeditor.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-05-23 11:38:33 -0400
committerOz Linden <oz@lindenlab.com>2011-05-23 11:38:33 -0400
commit551d17f819ea3dbcdc61cb41a458ab6d893d28cf (patch)
tree130c90ed3b0f6a4245af843cf9170130d549dc4f /indra/llui/lllineeditor.cpp
parent99fe1004a6cb4406bcac790420a5be6269e02723 (diff)
parente5752934be74a84e6ec0ff8cb96974bd1e9060ec (diff)
merge latest changes (post-2.7.0) from viewer-development
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r--indra/llui/lllineeditor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 2527a608bf..123997e5e9 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -391,7 +391,11 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)
setCursor(llmin((S32)mText.length(), getCursor()));
// Set current history line to end of history.
- if(mLineHistory.end() != mLineHistory.begin())
+ if (mLineHistory.empty())
+ {
+ mCurrentHistoryLine = mLineHistory.end();
+ }
+ else
{
mCurrentHistoryLine = mLineHistory.end() - 1;
}