| 428 | } |
| 429 | |
| 430 | void DocSearchController::onCodeEditorFocusChange( UICodeEditor* editor ) { |
| 431 | if ( mSearchState.editor && mSearchState.editor != editor ) { |
| 432 | TextSearchParams word; |
| 433 | if ( mSplitter->editorExists( mSearchState.editor ) ) { |
| 434 | word = mSearchState.editor->getHighlightWord(); |
| 435 | mSearchState.editor->setHighlightWord( { "" } ); |
| 436 | mSearchState.editor->setHighlightTextRange( TextRange() ); |
| 437 | } else { |
| 438 | mSearchState.editor = nullptr; |
| 439 | } |
| 440 | mSearchState.text = ""; |
| 441 | mSearchState.range = TextRange(); |
| 442 | if ( editor ) { |
| 443 | mSearchState.editor = editor; |
| 444 | mSearchState.editor->setHighlightWord( word ); |
| 445 | mSearchState.range = TextRange(); |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | SearchState& DocSearchController::getSearchState() { |
| 451 | return mSearchState; |
nothing calls this directly
no test coverage detected