summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-09-30 21:44:20 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-09-30 21:44:20 -0400
commit57969e41db06cbc5c0f9ffdeafb7c21e55b2731d (patch)
treeea54edd04380696ef3f83671204fdae2f7ae298e /indra/llui/lltexteditor.cpp
parentc4c537e957458650a2948ffbd3a787f007d87f7a (diff)
parenteca30a22626b9a3e68e0e55f8da75614cd60d713 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/login-api/
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 983777b747..8d5f277b59 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1120,21 +1120,12 @@ void LLTextEditor::updateCursorXPos()
}
// constraint cursor to editable segments of document
+// NOTE: index must be within document range
S32 LLTextEditor::getEditableIndex(S32 index, bool increasing_direction)
{
- //// always allow editable position at end of doc
- //if (index == getLength())
- //{
- // return index;
- //}
-
segment_set_t::iterator segment_iter;
S32 offset;
getSegmentAndOffset(index, &segment_iter, &offset);
- if (segment_iter == mSegments.end())
- {
- return 0;
- }
LLTextSegmentPtr segmentp = *segment_iter;
@@ -3194,7 +3185,11 @@ void LLTextEditor::draw()
drawLineNumbers();
{
- LLLocalClipRect clip(mTextRect);
+ // pad clipping rectangle so that cursor can draw at full width
+ // when at left edge of mTextRect
+ LLRect clip_rect(mTextRect);
+ clip_rect.stretch(1);
+ LLLocalClipRect clip(clip_rect);
drawSelectionBackground();
drawPreeditMarker();
drawText();