diff options
author | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
commit | c07901e29ed545bbb02e3bddf148fe1104b94e9f (patch) | |
tree | f1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/llui/lltexteditor.cpp | |
parent | Second Life viewer sources 1.15.0.2 (diff) | |
download | meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2 meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz |
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/llui/lltexteditor.cpp')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 787eba5..ba991c2 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -723,11 +723,11 @@ S32 LLTextEditor::prevWordPos(S32 cursorPos) const | |||
723 | S32 LLTextEditor::nextWordPos(S32 cursorPos) const | 723 | S32 LLTextEditor::nextWordPos(S32 cursorPos) const |
724 | { | 724 | { |
725 | const LLWString& wtext = mWText; | 725 | const LLWString& wtext = mWText; |
726 | while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos+1] ) ) | 726 | while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos] ) ) |
727 | { | 727 | { |
728 | cursorPos++; | 728 | cursorPos++; |
729 | } | 729 | } |
730 | while( (cursorPos < getLength()) && (wtext[cursorPos+1] == ' ') ) | 730 | while( (cursorPos < getLength()) && (wtext[cursorPos] == ' ') ) |
731 | { | 731 | { |
732 | cursorPos++; | 732 | cursorPos++; |
733 | } | 733 | } |
@@ -3667,10 +3667,18 @@ void LLTextEditor::pruneSegments() | |||
3667 | break; // done | 3667 | break; // done |
3668 | } | 3668 | } |
3669 | } | 3669 | } |
3670 | // erase invalid segments | 3670 | if (iter != mSegments.end()) |
3671 | ++iter; | 3671 | { |
3672 | std::for_each(iter, mSegments.end(), DeletePointer()); | 3672 | // erase invalid segments |
3673 | mSegments.erase(iter, mSegments.end()); | 3673 | ++iter; |
3674 | std::for_each(iter, mSegments.end(), DeletePointer()); | ||
3675 | mSegments.erase(iter, mSegments.end()); | ||
3676 | } | ||
3677 | else | ||
3678 | { | ||
3679 | llwarns << "Tried to erase end of empty LLTextEditor" | ||
3680 | << llendl; | ||
3681 | } | ||
3674 | } | 3682 | } |
3675 | 3683 | ||
3676 | void LLTextEditor::findEmbeddedItemSegments() | 3684 | void LLTextEditor::findEmbeddedItemSegments() |