summaryrefslogtreecommitdiff
path: root/editor/find_in_files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/find_in_files.cpp')
-rw-r--r--editor/find_in_files.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 47079a92b7..322dfc13a9 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -530,7 +530,7 @@ void FindInFilesDialog::_on_replace_text_entered(String text) {
void FindInFilesDialog::_on_folder_selected(String path) {
int i = path.find("://");
if (i != -1) {
- path = path.right(i + 3);
+ path = path.substr(i + 3);
}
_folder_line_edit->set_text(path);
}
@@ -838,7 +838,7 @@ void FindInFilesPanel::_on_replace_all_clicked() {
String fpath = file_item->get_metadata(0);
Vector<Result> locations;
- for (TreeItem *item = file_item->get_children(); item; item = item->get_next()) {
+ for (TreeItem *item = file_item->get_first_child(); item; item = item->get_next()) {
if (!item->is_checked(0)) {
continue;
}
@@ -932,7 +932,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
continue;
}
- line = line.left(repl_begin) + new_text + line.right(repl_end);
+ line = line.left(repl_begin) + new_text + line.substr(repl_end);
// keep an offset in case there are successive replaces in the same line
offset += new_text.length() - (repl_end - repl_begin);
}