Don't insert newline while saving

This commit is contained in:
kobewi 2023-11-22 17:33:38 +01:00
parent 95110ddcb4
commit b70368b78a
2 changed files with 2 additions and 11 deletions

View File

@ -1812,9 +1812,7 @@ static void _reset_animation_mixers(Node *p_node, List<Pair<AnimationMixer *, Re
}
void EditorNode::_save_scene(String p_file, int idx) {
if (!saving_scene.is_empty() && saving_scene == p_file) {
return;
}
ERR_FAIL_COND_MSG(!saving_scene.is_empty() && saving_scene == p_file, "Scene saved while already being saved!");
Node *scene = editor_data.get_edited_scene_root(idx);

View File

@ -1012,8 +1012,6 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
se->trim_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();
}
}