diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 55487f7896b..ea42fff85ac 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1812,9 +1812,7 @@ static void _reset_animation_mixers(Node *p_node, Listtrim_final_newlines(); } - se->insert_final_newline(); - if (convert_indent_on_save) { se->convert_indent(); } @@ -1410,8 +1408,6 @@ void ScriptEditor::_menu_option(int p_option) { current->trim_final_newlines(); } - current->insert_final_newline(); - if (convert_indent_on_save) { current->convert_indent(); } @@ -2614,8 +2610,6 @@ void ScriptEditor::save_current_script() { current->trim_final_newlines(); } - current->insert_final_newline(); - if (convert_indent_on_save) { current->convert_indent(); } @@ -2662,8 +2656,6 @@ void ScriptEditor::save_all_scripts() { se->trim_final_newlines(); } - se->insert_final_newline(); - if (!se->is_unsaved()) { continue; } @@ -2713,6 +2705,7 @@ void ScriptEditor::apply_scripts() const { if (!se) { continue; } + se->insert_final_newline(); se->apply_code(); } }