* Search for text in the target range of the document. * @return The position of the found text, -1 if not found. */
| 6056 | * @return The position of the found text, -1 if not found. |
| 6057 | */ |
| 6058 | long Editor::SearchInTarget ( const char *text, int length ) |
| 6059 | { |
| 6060 | int lengthFound = length; |
| 6061 | if ( !pdoc->HasCaseFolder() ) { |
| 6062 | pdoc->SetCaseFolder ( CaseFolderForEncoding() ); |
| 6063 | } |
| 6064 | int pos = pdoc->FindText ( targetStart, targetEnd, text, |
| 6065 | ( searchFlags & SCFIND_MATCHCASE ) != 0, |
| 6066 | ( searchFlags & SCFIND_WHOLEWORD ) != 0, |
| 6067 | ( searchFlags & SCFIND_WORDSTART ) != 0, |
| 6068 | ( searchFlags & SCFIND_REGEXP ) != 0, |
| 6069 | searchFlags, |
| 6070 | &lengthFound ); |
| 6071 | if ( pos != -1 ) { |
| 6072 | targetStart = pos; |
| 6073 | targetEnd = pos + lengthFound; |
| 6074 | } |
| 6075 | return pos; |
| 6076 | } |
| 6077 | |
| 6078 | void Editor::GoToLine ( int lineNo ) |
| 6079 | { |
nothing calls this directly
no test coverage detected