diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-09-26 18:08:24 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-09-26 18:08:24 -0400 |
commit | bc4444cd78067cbf11d3ffb210375a31a33f96bd (patch) | |
tree | d9b8e78db237869e630fec6c71335d1294cec101 /indra/llui/lltexteditor.cpp | |
parent | 8ddc0c0ac43e9d10bf0262cd1ab3c0e79808fc14 (diff) | |
parent | 09bf3c1fec107e9e66514837d208ef62a6b67b91 (diff) |
Merge into viewer/viewer-20 yesterday's lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 17 |
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(); |