diff options
author | Merov Linden <merov@lindenlab.com> | 2013-03-27 16:10:07 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-03-27 16:10:07 -0700 |
commit | dfa14269971fb102fbdd2c435d31d9eef1041f46 (patch) | |
tree | 87e6a6900540c26cfcff6627696d57fc6c775993 /indra/newview/llfloaterimnearbychat.cpp | |
parent | 9f819806cd0a2301c83a866d06594ce7b2f3c3d5 (diff) | |
parent | d29a2e2977090e0e4cf4c392d64757a10fca91a9 (diff) |
Pull merge from lindenlab/viewer-chui
Diffstat (limited to 'indra/newview/llfloaterimnearbychat.cpp')
-rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 171509af59..89b608b586 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -485,11 +485,14 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke() if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str)) { std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size()); - mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part + if (!rest_of_match.empty()) + { + mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part - // Select to end of line, starting from the character - // after the last one the user typed. - mInputEditor->selectNext(rest_of_match, false); + // Select to end of line, starting from the character + // after the last one the user typed. + mInputEditor->selectNext(rest_of_match, false); + } } else if (matchChatTypeTrigger(utf8_trigger, &utf8_out_str)) { |