summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-03-29 18:06:05 -0400
committerNyx Linden <nyx@lindenlab.com>2013-03-29 18:06:05 -0400
commitadc4f8d02e1184b3072a4ff511594d31c3cd68e0 (patch)
tree24ca324105772f18b70135f7d68bcc88cc993b83 /indra/llui/lltexteditor.cpp
parent8e7c04f1d0ef6a7be800a7f3539f301aaededd14 (diff)
parentab272c20a914c4816cee55db7a4bdd0217580630 (diff)
merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 3dc1b99edb..834f213097 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)