diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2022-10-07 11:34:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-07 11:34:11 +0200 |
| commit | 58ca3031419cacb35c530cebe68e87a4c27dde06 (patch) | |
| tree | b0965bb65919bc1495ee02204a91e5ed3a9b56a7 /editor/code_editor.cpp | |
| parent | 5b7f62af55b7f322192f95258d825b163cbf9dc1 (diff) | |
| parent | 0103af1ddda6a2aa31227965141dd7d3a513e081 (diff) | |
Merge pull request #66808 from bruvzg/msvc_warn
Diffstat (limited to 'editor/code_editor.cpp')
| -rw-r--r-- | editor/code_editor.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index fe9831d0ef..b73b49a434 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -184,7 +184,7 @@ void FindReplaceBar::_replace() { selection_end = Point2i(text_editor->get_selection_to_line(0), text_editor->get_selection_to_column(0)); } - String replace_text = get_replace_text(); + String repl_text = get_replace_text(); int search_text_len = get_search_text().length(); text_editor->begin_complex_operation(); @@ -201,13 +201,13 @@ void FindReplaceBar::_replace() { Point2i match_from(result_line, result_col); Point2i match_to(result_line, result_col + search_text_len); if (!(match_from < selection_begin || match_to > selection_end)) { - text_editor->insert_text_at_caret(replace_text, 0); + text_editor->insert_text_at_caret(repl_text, 0); if (match_to.x == selection_end.x) { // Adjust selection bounds if necessary - selection_end.y += replace_text.length() - search_text_len; + selection_end.y += repl_text.length() - search_text_len; } } } else { - text_editor->insert_text_at_caret(replace_text, 0); + text_editor->insert_text_at_caret(repl_text, 0); } } text_editor->end_complex_operation(); @@ -241,7 +241,7 @@ void FindReplaceBar::_replace_all() { text_editor->set_caret_line(0, false, true, 0, 0); text_editor->set_caret_column(0, true, 0); - String replace_text = get_replace_text(); + String repl_text = get_replace_text(); int search_text_len = get_search_text().length(); int rc = 0; @@ -264,7 +264,7 @@ void FindReplaceBar::_replace_all() { break; // Done. } - prev_match = Point2i(result_line, result_col + replace_text.length()); + prev_match = Point2i(result_line, result_col + repl_text.length()); text_editor->unfold_line(result_line); text_editor->select(result_line, result_col, result_line, match_to.y, 0); @@ -275,14 +275,14 @@ void FindReplaceBar::_replace_all() { } // Replace but adjust selection bounds. - text_editor->insert_text_at_caret(replace_text, 0); + text_editor->insert_text_at_caret(repl_text, 0); if (match_to.x == selection_end.x) { - selection_end.y += replace_text.length() - search_text_len; + selection_end.y += repl_text.length() - search_text_len; } } else { // Just replace. - text_editor->insert_text_at_caret(replace_text, 0); + text_editor->insert_text_at_caret(repl_text, 0); } rc++; |