diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-02 19:46:42 +0300 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-02 19:46:42 +0300 |
| commit | 367428e09e6e896aa125939f1c69992601588349 (patch) | |
| tree | 2189b853f4dfe99435048241bda6c3959b31f695 /indra/llui/lltexteditor.cpp | |
| parent | 84c848504c53a571a8be0281616e0dfecce53db3 (diff) | |
| parent | 3c27e119b4c2e10faa331e0724bde56c87234024 (diff) | |
Manual merge from default branch. Resolved conflicts in indra/newview/llfloatercamera.cpp.
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 6781c23416..482a53e4af 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -461,8 +461,13 @@ S32 LLTextEditor::nextWordPos(S32 cursorPos) const const LLTextSegmentPtr LLTextEditor::getPreviousSegment() const { + static LLPointer<LLIndexSegment> index_segment = new LLIndexSegment; + + index_segment->setStart(mCursorPos); + index_segment->setEnd(mCursorPos); + // find segment index at character to left of cursor (or rightmost edge of selection) - segment_set_t::const_iterator it = mSegments.lower_bound(new LLIndexSegment(mCursorPos)); + segment_set_t::const_iterator it = mSegments.lower_bound(index_segment); if (it != mSegments.end()) { |
