diff options
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 88ef2b5..4a8afef 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -266,12 +266,12 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) | |||
266 | 266 | ||
267 | std::string test_name(agent_name); | 267 | std::string test_name(agent_name); |
268 | std::transform(test_name.begin(), test_name.end(), test_name.begin(), tolower); | 268 | std::transform(test_name.begin(), test_name.end(), test_name.begin(), tolower); |
269 | std::transform(to_match.begin(), to_match.end(), to_match.begin(), tolower); | ||
269 | 270 | ||
270 | if (test_name.find(to_match) == 0) | 271 | if (test_name.find(to_match) == 0) |
271 | { | 272 | { |
272 | std::string rest_of_match = agent_name.substr(to_match.length(), agent_name.length()); | ||
273 | mInputEditor->setText(left_part.substr(0, left_part.length() - to_match.length()) + agent_name + right_part); | 273 | mInputEditor->setText(left_part.substr(0, left_part.length() - to_match.length()) + agent_name + right_part); |
274 | mInputEditor->setSelection(cursorPos, cursorPos + rest_of_match.length()); | 274 | mInputEditor->setSelection(cursorPos, cursorPos + (agent_name.length() - to_match.length())); |
275 | return TRUE; | 275 | return TRUE; |
276 | } | 276 | } |
277 | } | 277 | } |