diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lllineeditor.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index aeb906c..a12c9d8 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -132,7 +132,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, | |||
132 | mSelectAllonFocusReceived( FALSE ), | 132 | mSelectAllonFocusReceived( FALSE ), |
133 | mPassDelete(FALSE), | 133 | mPassDelete(FALSE), |
134 | mReadOnly(FALSE), | 134 | mReadOnly(FALSE), |
135 | mImage( sImage ) | 135 | mImage( sImage ), |
136 | mReplaceNewlinesWithSpaces( TRUE ) | ||
136 | { | 137 | { |
137 | llassert( max_length_bytes > 0 ); | 138 | llassert( max_length_bytes > 0 ); |
138 | 139 | ||
@@ -961,7 +962,7 @@ void LLLineEditor::paste() | |||
961 | LLWString clean_string(paste); | 962 | LLWString clean_string(paste); |
962 | LLWString::replaceTabsWithSpaces(clean_string, 1); | 963 | LLWString::replaceTabsWithSpaces(clean_string, 1); |
963 | //clean_string = wstring_detabify(paste, 1); | 964 | //clean_string = wstring_detabify(paste, 1); |
964 | LLWString::replaceChar(clean_string, '\n', ' '); | 965 | LLWString::replaceChar(clean_string, '\n', mReplaceNewlinesWithSpaces ? ' ' : 182); // 182 == paragraph character |
965 | 966 | ||
966 | // Insert the string | 967 | // Insert the string |
967 | 968 | ||
@@ -2547,6 +2548,10 @@ S32 LLLineEditor::getPreeditFontSize() const | |||
2547 | return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); | 2548 | return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); |
2548 | } | 2549 | } |
2549 | 2550 | ||
2551 | void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace) | ||
2552 | { | ||
2553 | mReplaceNewlinesWithSpaces = replace; | ||
2554 | } | ||
2550 | 2555 | ||
2551 | static LLRegisterWidget<LLSearchEditor> r2("search_editor"); | 2556 | static LLRegisterWidget<LLSearchEditor> r2("search_editor"); |
2552 | 2557 | ||