diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-06-28 11:34:46 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-06-28 11:34:46 +0200 |
commit | 89cf82fbde3d889da7a7b6f5c6aa937c3943bba9 (patch) | |
tree | 70091b6e9f819694cfcd8605912ed5cfe2988b6b /editor/code_editor.cpp | |
parent | af862d072df39a90a116299958dfa94b9db425ea (diff) | |
parent | e3195bd15b0a17e238d802374fc5deb967cbf726 (diff) | |
download | redot-engine-89cf82fbde3d889da7a7b6f5c6aa937c3943bba9.tar.gz |
Merge pull request #93056 from kitbdev/stop-highlighting
Fix find highlight when switching scripts
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 7e07e626b1..be0a09e09b 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -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)); @@ -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() { |