|
@@ -723,6 +723,8 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
|
|
se->trim_trailing_whitespace();
|
|
se->trim_trailing_whitespace();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ se->insert_final_newline();
|
|
|
|
+
|
|
if (convert_indent_on_save) {
|
|
if (convert_indent_on_save) {
|
|
if (use_space_indentation) {
|
|
if (use_space_indentation) {
|
|
se->convert_indent_to_spaces();
|
|
se->convert_indent_to_spaces();
|
|
@@ -1078,6 +1080,8 @@ void ScriptEditor::_menu_option(int p_option) {
|
|
if (trim_trailing_whitespace_on_save)
|
|
if (trim_trailing_whitespace_on_save)
|
|
current->trim_trailing_whitespace();
|
|
current->trim_trailing_whitespace();
|
|
|
|
|
|
|
|
+ current->insert_final_newline();
|
|
|
|
+
|
|
if (convert_indent_on_save) {
|
|
if (convert_indent_on_save) {
|
|
if (use_space_indentation) {
|
|
if (use_space_indentation) {
|
|
current->convert_indent_to_spaces();
|
|
current->convert_indent_to_spaces();
|
|
@@ -1097,7 +1101,10 @@ void ScriptEditor::_menu_option(int p_option) {
|
|
} break;
|
|
} break;
|
|
case FILE_SAVE_AS: {
|
|
case FILE_SAVE_AS: {
|
|
|
|
|
|
- current->trim_trailing_whitespace();
|
|
|
|
|
|
+ if (trim_trailing_whitespace_on_save)
|
|
|
|
+ current->trim_trailing_whitespace();
|
|
|
|
+
|
|
|
|
+ current->insert_final_newline();
|
|
|
|
|
|
if (convert_indent_on_save) {
|
|
if (convert_indent_on_save) {
|
|
if (use_space_indentation) {
|
|
if (use_space_indentation) {
|
|
@@ -2121,6 +2128,8 @@ void ScriptEditor::save_all_scripts() {
|
|
se->trim_trailing_whitespace();
|
|
se->trim_trailing_whitespace();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ se->insert_final_newline();
|
|
|
|
+
|
|
if (!se->is_unsaved())
|
|
if (!se->is_unsaved())
|
|
continue;
|
|
continue;
|
|
|
|
|