summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-07-30 15:17:50 -0700
committerRichard Nelson <none@none>2010-07-30 15:17:50 -0700
commitc60fd88714727a86d5b905c1986bc2ca6013791e (patch)
treec41da40bbfe02dc2d1441b95e5a0e84cf7dd300b /indra/llui/lltexteditor.cpp
parentfbd05e947829714d81278dfa0b138b22e32d56a7 (diff)
parentb95ad3b5cec84387d20d2a1af08eeb090b54b134 (diff)
merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp7
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())
{