summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-06-22 17:04:47 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-06-22 17:04:47 +0300
commit47c140b81d868229187f85185e4721946430ad87 (patch)
tree7894fb0915ab42e88d770a49e8d4090343386a33 /indra
parent91be3bf3019581b74a3515c1081aef883c0658fa (diff)
CHUI-127 ADDITIONAL FIX (Make chat field auto resizable)
- Fixed crash which occurred while navigating through history of sent messages
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llchatentry.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp
index dea8ff9bb2..a6ba125406 100644
--- a/indra/llui/llchatentry.cpp
+++ b/indra/llui/llchatentry.cpp
@@ -170,13 +170,14 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
case KEY_DOWN:
if (mHasHistory && MASK_CONTROL == mask)
{
- if (!mLineHistory.empty() && ++mCurrentHistoryLine < mLineHistory.end())
+ if (!mLineHistory.empty() && mCurrentHistoryLine < (mLineHistory.end() - 1) )
{
- setText(*mCurrentHistoryLine);
+ setText(*(++mCurrentHistoryLine));
endOfDoc();
}
- else if (!mLineHistory.empty() && mCurrentHistoryLine == mLineHistory.end())
+ else if (!mLineHistory.empty() && mCurrentHistoryLine == (mLineHistory.end() - 1) )
{
+ mCurrentHistoryLine++;
std::string empty("");
setText(empty);
needsReflow();