diff options
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 10c173ffe8..91ccede26d 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1049,6 +1049,7 @@ void CodeTextEditor::update_editor_settings() { // Appearance: Whitespace text_editor->set_draw_tabs(EDITOR_GET("text_editor/appearance/whitespace/draw_tabs")); text_editor->set_draw_spaces(EDITOR_GET("text_editor/appearance/whitespace/draw_spaces")); + text_editor->add_theme_constant_override("line_spacing", EDITOR_GET("text_editor/appearance/whitespace/line_spacing")); // Behavior: Navigation text_editor->set_scroll_past_end_of_file_enabled(EDITOR_GET("text_editor/behavior/navigation/scroll_past_end_of_file")); @@ -1143,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()); |