FIRE-15712: Using Unicode characters in chat bar selects wrong part of the string when using nearby avatar name prediction
parent
c2225763ec
commit
939214ef68
|
|
@ -923,7 +923,7 @@ void FSFloaterNearbyChat::onChatBoxKeystroke()
|
|||
if (!rest_of_match.empty())
|
||||
{
|
||||
mInputEditor->setText(prefix + replaced_text + suffix);
|
||||
mInputEditor->selectByCursorPosition(prefix.size() + match.size(), prefix.size() + replaced_text.size());
|
||||
mInputEditor->selectByCursorPosition(utf8string_to_wstring(prefix).size() + utf8string_to_wstring(match).size(), utf8string_to_wstring(prefix).size() + utf8string_to_wstring(replaced_text).size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ void FSNearbyChatControl::onKeystroke(LLLineEditor* caller,void* userdata)
|
|||
prefix += match + rest_of_match + " ";
|
||||
}
|
||||
caller->setText(prefix + suffix);
|
||||
caller->setSelection(prefix.length(), cur_pos);
|
||||
caller->setSelection(utf8str_to_wstring(prefix).length(), cur_pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue