mirror of
https://github.com/Relintai/godot-engine.file-editor.git
synced 2024-11-12 22:27:22 +01:00
Don't skip empty lines when saving a file.
This commit is contained in:
parent
3eac800771
commit
cdd7a73813
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user