| 563 | } |
| 564 | |
| 565 | void 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 | |
| 582 | bool UIDocFindReplace::replaceSelection( TextSearchParams& search, const String& replacement ) { |
| 583 | UICodeEditor* editor = |
nothing calls this directly
no test coverage detected