mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 18:16:31 +03:00
ecode: Fixed a crash in doc search controller.
This commit is contained in:
@@ -357,9 +357,14 @@ void DocSearchController::hideSearchBar() {
|
||||
|
||||
void DocSearchController::onCodeEditorFocusChange( UICodeEditor* editor ) {
|
||||
if ( mSearchState.editor && mSearchState.editor != editor ) {
|
||||
auto word = mSearchState.editor->getHighlightWord();
|
||||
mSearchState.editor->setHighlightWord( { "" } );
|
||||
mSearchState.editor->setHighlightTextRange( TextRange() );
|
||||
TextSearchParams word;
|
||||
if ( mEditorSplitter->editorExists( mSearchState.editor ) ) {
|
||||
word = mSearchState.editor->getHighlightWord();
|
||||
mSearchState.editor->setHighlightWord( { "" } );
|
||||
mSearchState.editor->setHighlightTextRange( TextRange() );
|
||||
} else {
|
||||
mSearchState.editor = nullptr;
|
||||
}
|
||||
mSearchState.text = "";
|
||||
mSearchState.range = TextRange();
|
||||
if ( editor ) {
|
||||
|
||||
Reference in New Issue
Block a user