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

Method onCodeEditorFocusChange

src/tools/ecode/docsearchcontroller.cpp:430–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430void 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
450SearchState& DocSearchController::getSearchState() {
451 return mSearchState;

Callers

nothing calls this directly

Calls 3

setHighlightWordMethod · 0.80
setHighlightTextRangeMethod · 0.80
editorExistsMethod · 0.45

Tested by

no test coverage detected