diff options
| author | simon <none@none> | 2014-03-19 11:41:42 -0700 |
|---|---|---|
| committer | simon <none@none> | 2014-03-19 11:41:42 -0700 |
| commit | 00a325ccb90b1c6800ec78e1211b5097d9c27a58 (patch) | |
| tree | 8b58fbd99d5bce117cf8dad5181b5690af4bd34f /indra/llui/lltexteditor.cpp | |
| parent | 09d1c27d4f78c78d949b6a3d896d6f58df2dfc06 (diff) | |
| parent | 1ab9f19f82a84a109cf429998f423986268801f6 (diff) | |
Pull in viewer-lion to lock down next release
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rwxr-xr-x | indra/llui/lltexteditor.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 02c81c0744..6c4d031907 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -264,7 +264,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mContextMenu(NULL), mShowContextMenu(p.show_context_menu), mEnableTooltipPaste(p.enable_tooltip_paste), - mPassDelete(FALSE) + mPassDelete(FALSE), + mKeepSelectionOnReturn(false) { mSourceID.generate(); @@ -1664,7 +1665,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) case KEY_RETURN: if (mask == MASK_NONE) { - if( hasSelection() ) + if( hasSelection() && !mKeepSelectionOnReturn ) { deleteSelection(FALSE); } @@ -2338,7 +2339,8 @@ void LLTextEditor::autoIndent() S32 i; LLWString text = getWText(); - while( ' ' == text[line_start] ) + S32 offset = getLineOffsetFromDocIndex(mCursorPos); + while(( ' ' == text[line_start] ) && (space_count < offset)) { space_count++; line_start++; |
