MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / SearchInTarget

Method SearchInTarget

scintilla/src/Editor.cxx:6058–6076  ·  view source on GitHub ↗

* Search for text in the target range of the document. * @return The position of the found text, -1 if not found. */

Source from the content-addressed store, hash-verified

6056 * @return The position of the found text, -1 if not found.
6057 */
6058long 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
6078void Editor::GoToLine ( int lineNo )
6079{

Callers

nothing calls this directly

Calls 3

HasCaseFolderMethod · 0.80
SetCaseFolderMethod · 0.80
FindTextMethod · 0.45

Tested by

no test coverage detected