summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormberezhnoy <mberezhnoy@productengine.com>2013-03-27 18:28:27 +0200
committermberezhnoy <mberezhnoy@productengine.com>2013-03-27 18:28:27 +0200
commit04ddc046661df3d7c4860cafc88556e1e24b485b (patch)
tree409d6afdacd2a24be1a86c9e727ce0806d2960c2 /indra
parentf86be5c85f30af83e761b0c94e089ec82532db48 (diff)
CHUI-893 ([CHUIBUG]Chat input field scrambles "/nod")
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp11
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))
{