diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp index b0550be5db..eea5ef99bf 100755 --- a/indra/llui/llchatentry.cpp +++ b/indra/llui/llchatentry.cpp @@ -268,3 +268,21 @@ void LLChatEntry::enableSingleLineMode(bool single_line_mode) mPrevLinesCount = -1; setWordWrap(!single_line_mode); } + + +// Fix linefeed pasting +//virtual +void LLChatEntry::paste() +{ + LLTextEditor::paste(); + + if (mSingleLineMode) + { + S32 cursor_pos = getCursorPos(); + LLWString content = getWText(); + LLWStringUtil::replaceChar(content, '\n', 182); + setWText(content); + setCursorPos(cursor_pos); + } +} +// diff --git a/indra/llui/llchatentry.h b/indra/llui/llchatentry.h index 494024002a..1046cfc79f 100755 --- a/indra/llui/llchatentry.h +++ b/indra/llui/llchatentry.h @@ -71,6 +71,9 @@ public: // Changed to public so we can update history when using modifier keys void updateHistory(); + // Fix linefeed pasting + /*virtual*/ void paste(); + private: /**