Don't skip empty lines when saving a file.

This commit is contained in:
Relintai 2022-07-15 14:13:02 +02:00
parent 3eac800771
commit cdd7a73813
2 changed files with 8 additions and 3 deletions

View File

@ -550,14 +550,15 @@ func create_new_file(given_path : String) -> void:
func save_file(current_path : String) -> void:
print("Saving file: ",current_path)
var current_file : File = File.new()
current_file.open(current_path,File.WRITE)
var current_content : String = ""
var lines : int = current_editor.text_editor.get_line_count()
for line in range(0,lines):
if current_editor.text_editor.get_line(line) == "":
continue
for line in range(lines):
#if current_editor.text_editor.get_line(line) == "":
# continue
current_content = current_editor.text_editor.get_text()
current_file.store_line(current_editor.text_editor.get_line(line))

View File

@ -13,6 +13,10 @@ config_version=4
config/name="fileed"
config/icon="res://icon.png"
[editor_plugins]
enabled=PoolStringArray( "res://addons/file-editor/plugin.cfg" )
[physics]
common/enable_pause_aware_picking=true