1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Merge pull request #93056 from kitbdev/stop-highlighting

Fix find highlight when switching scripts
This commit is contained in:
Rémi Verschelde
2024-06-28 11:34:46 +02:00

View File

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