diff options
author | Mark Palange <palange@lindenlab.com> | 2008-12-23 19:39:58 +0000 |
---|---|---|
committer | Mark Palange <palange@lindenlab.com> | 2008-12-23 19:39:58 +0000 |
commit | fb793870fe95f1951d7c30ea6068e187b9dededd (patch) | |
tree | 6d11632353ff4fb07133625ec5031b135b1e2882 /indra/llui/lltexteditor.cpp | |
parent | d182b9fb82b9c63f41d81bc80dbbfe627475facf (diff) |
QAR-1142 merging 1.22 RC0-RC4 changes.
svn merge -c 106471 svn+ssh://svn.lindenlab.com/svn/linden/qa/viewer_1-22-106055_merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index f2562a015d..3b6ee33d38 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -471,9 +471,9 @@ void LLTextEditor::updateLineStartList(S32 startpos) } // if scrolled to bottom, stay at bottom - // unless user is editing text + // unless user is selecting text // do this after updating page size - if (mScrolledToBottom && mTrackBottom && !hasFocus()) + if (mScrolledToBottom && mTrackBottom && !hasMouseCapture()) { endOfDoc(); } @@ -4257,11 +4257,9 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) std::string openers=" \t\n('\"[{<>"; std::string closers=" \t\n)'\"]}><;"; - S32 index = 0; - if (reverse) { - for (index=pos; index >= 0; index--) + for (int index=pos; index >= 0; index--) { char c = line[index]; S32 m2 = openers.find(c); @@ -4270,11 +4268,12 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) return index+1; } } + return 0; // index is -1, don't want to return that. } else { - for (index=pos; index<(S32)line.length(); index++) + for (int index=pos; index<(S32)line.length(); index++) { char c = line[index]; S32 m2 = closers.find(c); @@ -4283,9 +4282,8 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) return index; } } + return line.length(); } - - return index; } BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const |