Use String.repeat() in more places

This commit is contained in:
VolTer committed 2023-05-01 02:27:46 +02:00
1 parent 10d22a4b35
commit 6b84e258d2
12 files changed
+37 -94

No files matched your search

+1 -5
View File
@@ -1138,11 +1138,7 @@ void CodeTextEditor::insert_final_newline() {
void CodeTextEditor::convert_indent_to_spaces() {
int indent_size = EDITOR_GET("text_editor/behavior/indent/size");
String indent = "";
for (int i = 0; i < indent_size; i++) {
indent += " ";
}
String indent = String(" ").repeat(indent_size);
Vector<int> cursor_columns;
cursor_columns.resize(text_editor->get_caret_count());