Skip to content
Snippets Groups Projects
Commit 04ddc046 authored by mberezhnoy's avatar mberezhnoy
Browse files

CHUI-893 ([CHUIBUG]Chat input field scrambles "/nod")

parent f86be5c8
No related branches found
No related tags found
No related merge requests found
......@@ -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))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment