diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-05-20 23:56:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 23:56:17 +0200 |
commit | bfe4af91a26787c11c3d4c84a216d6d728322035 (patch) | |
tree | b6c994cc1c4226f9c45b3e2d0e2b467a657b7bc1 /editor/find_in_files.cpp | |
parent | 98071ec136bad8ede5f8c0505e6cff6f33f787ef (diff) | |
parent | b1859510ab0a3381e0a5bec3d896032fc5019147 (diff) |
Merge pull request #36180 from KoBeWi/I_broke_your_right
Change behavior of String.right
Diffstat (limited to 'editor/find_in_files.cpp')
-rw-r--r-- | editor/find_in_files.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 4fa131e991..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); } @@ -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); } |