diff options
Diffstat (limited to 'linden/indra/llui/lltexteditor.cpp')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 714ee7c..3813e76 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2001-2008, Linden Research, Inc. | 7 | * Copyright (c) 2001-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -473,9 +473,9 @@ void LLTextEditor::updateLineStartList(S32 startpos) | |||
473 | } | 473 | } |
474 | 474 | ||
475 | // if scrolled to bottom, stay at bottom | 475 | // if scrolled to bottom, stay at bottom |
476 | // unless user is editing text | 476 | // unless user is selecting text |
477 | // do this after updating page size | 477 | // do this after updating page size |
478 | if (mScrolledToBottom && mTrackBottom && !hasFocus()) | 478 | if (mScrolledToBottom && mTrackBottom && !hasMouseCapture()) |
479 | { | 479 | { |
480 | endOfDoc(); | 480 | endOfDoc(); |
481 | } | 481 | } |
@@ -1011,7 +1011,7 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) | |||
1011 | } | 1011 | } |
1012 | else | 1012 | else |
1013 | { | 1013 | { |
1014 | while( (text[right] != '\n') && (right <= getLength() ) ) | 1014 | while( right < getLength() && (text[right] != '\n') ) |
1015 | { | 1015 | { |
1016 | right++; | 1016 | right++; |
1017 | } | 1017 | } |
@@ -1323,8 +1323,6 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | |||
1323 | 1323 | ||
1324 | setCursorAtLocalPos( x, y, TRUE ); | 1324 | setCursorAtLocalPos( x, y, TRUE ); |
1325 | endSelection(); | 1325 | endSelection(); |
1326 | |||
1327 | updateScrollFromCursor(); | ||
1328 | } | 1326 | } |
1329 | 1327 | ||
1330 | if( !hasSelection() ) | 1328 | if( !hasSelection() ) |
@@ -2594,7 +2592,7 @@ void LLTextEditor::drawSelectionBackground() | |||
2594 | BOOL selection_visible = (left_visible_pos <= selection_right) && (selection_left <= right_visible_pos); | 2592 | BOOL selection_visible = (left_visible_pos <= selection_right) && (selection_left <= right_visible_pos); |
2595 | if( selection_visible ) | 2593 | if( selection_visible ) |
2596 | { | 2594 | { |
2597 | LLGLSNoTexture no_texture; | 2595 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
2598 | const LLColor4& color = mReadOnly ? mReadOnlyBgColor : mWriteableBgColor; | 2596 | const LLColor4& color = mReadOnly ? mReadOnlyBgColor : mWriteableBgColor; |
2599 | F32 alpha = hasFocus() ? 1.f : 0.5f; | 2597 | F32 alpha = hasFocus() ? 1.f : 0.5f; |
2600 | gGL.color4f( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], alpha ); | 2598 | gGL.color4f( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], alpha ); |
@@ -2729,7 +2727,7 @@ void LLTextEditor::drawCursor() | |||
2729 | } | 2727 | } |
2730 | } | 2728 | } |
2731 | 2729 | ||
2732 | LLGLSNoTexture no_texture; | 2730 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
2733 | 2731 | ||
2734 | gGL.color4fv( mCursorColor.mV ); | 2732 | gGL.color4fv( mCursorColor.mV ); |
2735 | 2733 | ||
@@ -4259,7 +4257,7 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) | |||
4259 | std::string closers=" \t\n)'\"]}><;"; | 4257 | std::string closers=" \t\n)'\"]}><;"; |
4260 | 4258 | ||
4261 | S32 index = 0; | 4259 | S32 index = 0; |
4262 | 4260 | ||
4263 | if (reverse) | 4261 | if (reverse) |
4264 | { | 4262 | { |
4265 | for (index=pos; index >= 0; index--) | 4263 | for (index=pos; index >= 0; index--) |