diff options
author | Ricky Curtice <kf6kjg+hg@gmail.com> | 2014-06-05 06:31:30 -0700 |
---|---|---|
committer | Ricky Curtice <kf6kjg+hg@gmail.com> | 2014-06-05 06:31:30 -0700 |
commit | 98720c3cec8f1ab4af5e66f9d9b7bb9c277b78f1 (patch) | |
tree | ef36b7031df4c96eab6b5f3343325f662382932c /indra/llui/lltexteditor.cpp | |
parent | 644ca6a0f8a7759119814f88df93b8e838321a12 (diff) | |
parent | 15d8f355072f2184f046a7aafb1b5c606fe97880 (diff) |
Merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rwxr-xr-x | indra/llui/lltexteditor.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index c797b6acc5..a212c5dcd9 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2512,53 +2512,6 @@ BOOL LLTextEditor::tryToRevertToPristineState() return isPristine(); // TRUE => success } - -static LLTrace::BlockTimerStatHandle FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); -void LLTextEditor::loadKeywords(const std::string& filename, - const std::vector<std::string>& funcs, - const std::vector<std::string>& tooltips, - const LLColor3& color) -{ - LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); - if(mKeywords.loadFromFile(filename)) - { - S32 count = llmin(funcs.size(), tooltips.size()); - for(S32 i = 0; i < count; i++) - { - std::string name = utf8str_trim(funcs[i]); - mKeywords.addToken(LLKeywordToken::WORD, name, color, tooltips[i] ); - } - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); - - mSegments.clear(); - segment_set_t::iterator insert_it = mSegments.begin(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insert_it = mSegments.insert(insert_it, *list_it); - } - } -} - -void LLTextEditor::updateSegments() -{ - if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) - { - LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); - // HACK: No non-ascii keywords for now - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); - - clearSegments(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insertSegment(*list_it); - } - } - - LLTextBase::updateSegments(); -} - void LLTextEditor::updateLinkSegments() { LLWString wtext = getWText(); |