Skip to content

Commit

Permalink
Merge pull request #93056 from kitbdev/stop-highlighting
Browse files Browse the repository at this point in the history
Fix find highlight when switching scripts
  • Loading branch information
akien-mga committed Jun 28, 2024
2 parents af862d0 + e3195bd commit 89cf82f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) {
}

if (base_text_editor) {
text_editor->set_search_text(String());
base_text_editor->remove_find_replace_bar();
base_text_editor = nullptr;
text_editor->disconnect(SceneStringName(text_changed), callable_mp(this, &FindReplaceBar::_editor_text_changed));
Expand All @@ -670,8 +671,7 @@ void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) {
text_editor = base_text_editor->get_text_editor();
text_editor->connect(SceneStringName(text_changed), callable_mp(this, &FindReplaceBar::_editor_text_changed));

_update_results_count();
_update_matches_display();
_editor_text_changed();
}

void FindReplaceBar::_bind_methods() {
Expand Down

0 comments on commit 89cf82f

Please sign in to comment.