From 4f467e6e2531c26bcd6159bba816a04cd09034c9 Mon Sep 17 00:00:00 2001 From: Anders Arnholm Date: Sun, 8 Feb 2009 15:53:37 +0100 Subject: [PATCH] Find htheml never finds before begining of string. --- linden/indra/llui/lltexteditor.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index b308086..d0ddb54 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -3539,6 +3539,7 @@ void LLTextEditor::appendStyledText(const std::string &new_text, std::string text = new_text; while ( findHTML(text, &start, &end) ) { + LLStyleSP html(new LLStyle); html->setVisible(true); html->setColor(mLinkColor); @@ -4274,6 +4275,7 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) return index+1; } } + index = 0; // Can't be before first charater } else { @@ -4324,6 +4326,9 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const { *begin = findHTMLToken(line, m1, TRUE); *end = findHTMLToken(line, m1, FALSE); + if(*begin < 0) { // Can't start before the first char + //*begin = 0; + } //Load_url only handles http and https so don't hilite ftp, smb, etc. try { -- 1.5.6.3