summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-01-11 12:57:42 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-01-11 12:57:42 +0200
commit9393c28831c3b51d9b84950bb0bc89ca50edac23 (patch)
tree46f3aeb3d340d115c6ccd4a53993350b47691f96 /indra/newview/llchathistory.cpp
parent1a21ce62c225dfc8f2671691929a3b1a9bc73726 (diff)
parentdf08485cf840e21e2ec8d14664a45714e0a3ca96 (diff)
Merge from default branch.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 21cadda6e3..cda3e3a419 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -576,10 +576,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
style_params.font.style = "ITALIC";
if (chat.mFromName.size() > 0)
- mEditor->appendText(chat.mFromName + " ", TRUE, style_params);
+ mEditor->appendText(chat.mFromName, TRUE, style_params);
// Ensure that message ends with NewLine, to avoid losing of new lines
// while copy/paste from text chat. See EXT-3263.
- mEditor->appendText(chat.mText.substr(4) + NEW_LINE, FALSE, style_params);
+ mEditor->appendText(chat.mText.substr(3) + NEW_LINE, FALSE, style_params);
}
else
{
@@ -593,6 +593,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
mEditor->appendText(message, FALSE, style_params);
}
mEditor->blockUndo();
+
+ // automatically scroll to end when receiving chat from myself
+ if (chat.mFromID == gAgentID)
+ {
+ mEditor->setCursorAndScrollToEnd();
+ }
}
void LLChatHistory::draw()