voidHighLighter::Scan(TRichEdit*){ intlen = r->Text.Length(); find.clear(); TSearchTypes sOpts; sOpts = TSearchTypes() << stMatchCase << stWholeWord; for(pos = Lib->begin();pos != Lib->end();++pos){ intstart = 0, end = len, is; while(0 <= (is = r->FindTextA(pos->word,start,end,sOpts))){ find[is+1] = pos;// пересчитываем переменные поиска start += pos->size; end = len - start; } } }