summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 61df3a977a..91ccede26d 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1144,11 +1144,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());