summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltextbase.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 6f9f98187c..4a7d17cc62 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -641,8 +641,6 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s
if ( truncate() )
{
- // The user's not getting everything he's hoping for
- make_ui_sound("UISndBadKeystroke");
insert_len = getLength() - old_len;
}
@@ -1070,6 +1068,8 @@ void LLTextBase::reflow(S32 start_index)
LLRect old_cursor_rect = getLocalRectFromDocIndex(mCursorPos);
bool follow_selection = mTextRect.overlaps(old_cursor_rect); // cursor is visible
+ old_cursor_rect.translate(-mTextRect.mLeft, -mTextRect.mBottom);
+
S32 first_line = getFirstVisibleLine();
// if scroll anchor not on first line, update it to first character of first line
@@ -1206,9 +1206,7 @@ void LLTextBase::reflow(S32 start_index)
{
// keep cursor in same vertical position on screen when selecting text
LLRect new_cursor_rect_doc = getDocRectFromDocIndex(mCursorPos);
- LLRect old_cursor_rect_scroller = old_cursor_rect;
- old_cursor_rect.translate(-mTextRect.mLeft, -mTextRect.mBottom);
- mScroller->scrollToShowRect(new_cursor_rect_doc, old_cursor_rect_scroller);
+ mScroller->scrollToShowRect(new_cursor_rect_doc, old_cursor_rect);
}
else
{