MCPcopy Create free account
hub / github.com/SpartanJ/eepp / refreshHighlight

Method refreshHighlight

src/eepp/ui/tools/uidocfindreplace.cpp:565–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565void UIDocFindReplace::refreshHighlight( UICodeEditor* editor ) {
566 mSearchState.text = mFindInput->getText();
567 if ( editor )
568 editor->setHighlightWord( mSearchState );
569 if ( !mSearchState.text.empty() ) {
570 mDoc->setSelection( { 0, 0 } );
571 if ( !findNextText( mSearchState ) ) {
572 mFindInput->addClass( "error" );
573 } else {
574 mFindInput->removeClass( "error" );
575 }
576 } else {
577 mFindInput->removeClass( "error" );
578 mDoc->setSelection( mDoc->getSelection().start() );
579 }
580};
581
582bool UIDocFindReplace::replaceSelection( TextSearchParams& search, const String& replacement ) {
583 UICodeEditor* editor =

Callers

nothing calls this directly

Calls 8

setHighlightWordMethod · 0.80
addClassMethod · 0.80
removeClassMethod · 0.80
getTextMethod · 0.45
emptyMethod · 0.45
setSelectionMethod · 0.45
startMethod · 0.45
getSelectionMethod · 0.45

Tested by

no test coverage detected