diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 740a03579c..5de172ab36 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1352,7 +1352,11 @@ void LLTextBase::replaceWithSuggestion(U32 index) // Insert the suggestion in its place LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]); - insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index])); + LLStyleConstSP sp(new LLStyle(getStyleParams())); + LLTextSegmentPtr segmentp = new LLNormalTextSegment(sp, it->first, it->first + suggestion.size(), *this); + segment_vec_t segments(1, segmentp); + insertStringNoUndo(it->first, suggestion, &segments); + setCursorPos(it->first + (S32)suggestion.length()); break;