summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 2f479527f3..723dbf5d6c 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -374,7 +374,7 @@ void ScriptEditorQuickOpen::_update_search() {
for (int i = 0; i < functions.size(); i++) {
String file = functions[i];
- if ((search_box->get_text().is_empty() || file.findn(search_box->get_text()) != -1)) {
+ if ((search_box->get_text().is_empty() || file.containsn(search_box->get_text()))) {
TreeItem *ti = search_options->create_item(root);
ti->set_text(0, file);
if (root->get_first_child() == ti) {
@@ -742,7 +742,7 @@ void ScriptEditor::_add_recent_script(const String &p_path) {
}
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scripts", Array());
- if (rc.find(p_path) != -1) {
+ if (rc.has(p_path)) {
rc.erase(p_path);
}
rc.push_front(p_path);