diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 1bac9702c..8aa058936 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -415,8 +415,10 @@ protected: S32 removeChar(S32 pos); void removeWord(bool prev); S32 insert(const S32 pos, const LLWString &wstr, const BOOL group_with_next_op); +public: S32 remove(const S32 pos, const S32 length, const BOOL group_with_next_op); - +protected: + // Direct operations S32 insertStringNoUndo(S32 pos, const LLWString &wstr); // returns num of chars actually inserted S32 removeStringNoUndo(S32 pos, S32 length); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index c708c056e..6851a476a 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1490,11 +1490,7 @@ void LLFloaterIMPanel::sessionInitReplyReceived(const LLUUID& session_id) mVoiceChannel->updateSessionID(session_id); mSessionInitialized = true; - //we assume the history editor hasn't moved at all since - //we added the starting session message - //so, we count how many characters to remove - S32 chars_to_remove = mHistoryEditor->getWText().length() - mSessionStartMsgPos; - mHistoryEditor->removeTextFromEnd(chars_to_remove); + mHistoryEditor->remove(mSessionStartMsgPos, sSessionStartString.size(), true); //and now, send the queued msg for (LLSD::array_iterator iter = mQueuedMsgsForInit.beginArray();