diff options
author | Oz Linden <oz@lindenlab.com> | 2013-04-01 09:34:41 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-04-01 09:34:41 -0400 |
commit | 90b56ee9fa95ca8cc15e3abc81977f504eb32c5b (patch) | |
tree | 581e4ba644ebf770dbdab292ea9f10d4b9404cb6 /indra/llui/lltexteditor.cpp | |
parent | 130e4e510198147664a2377b62b22d8e42f00f04 (diff) | |
parent | 49bef4e122e3ab4c82962e25f4ec1803c4e0c600 (diff) |
merge changes for 3.5.0-beta7
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index d5e08fa29b..b8bdea48b5 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -956,12 +956,18 @@ S32 LLTextEditor::insert(S32 pos, const LLWString &wstr, bool group_with_next_op S32 LLTextEditor::remove(S32 pos, S32 length, bool group_with_next_op) { S32 end_pos = getEditableIndex(pos + length, true); + BOOL removedChar = FALSE; segment_vec_t segments_to_remove; // store text segments getSegmentsInRange(segments_to_remove, pos, pos + length, false); + + if(pos <= end_pos) + { + removedChar = execute( new TextCmdRemove( pos, group_with_next_op, end_pos - pos, segments_to_remove ) ); + } - return execute( new TextCmdRemove( pos, group_with_next_op, end_pos - pos, segments_to_remove ) ); + return removedChar; } S32 LLTextEditor::overwriteChar(S32 pos, llwchar wc) |