mirror of
https://github.com/Relintai/godot-engine.file-editor.git
synced 2025-02-22 07:37:57 +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:
|
func save_file(current_path : String) -> void:
|
||||||
print("Saving file: ",current_path)
|
print("Saving file: ",current_path)
|
||||||
|
|
||||||
var current_file : File = File.new()
|
var current_file : File = File.new()
|
||||||
current_file.open(current_path,File.WRITE)
|
current_file.open(current_path,File.WRITE)
|
||||||
var current_content : String = ""
|
var current_content : String = ""
|
||||||
var lines : int = current_editor.text_editor.get_line_count()
|
var lines : int = current_editor.text_editor.get_line_count()
|
||||||
|
|
||||||
for line in range(0,lines):
|
for line in range(lines):
|
||||||
if current_editor.text_editor.get_line(line) == "":
|
#if current_editor.text_editor.get_line(line) == "":
|
||||||
continue
|
# continue
|
||||||
|
|
||||||
current_content = current_editor.text_editor.get_text()
|
current_content = current_editor.text_editor.get_text()
|
||||||
current_file.store_line(current_editor.text_editor.get_line(line))
|
current_file.store_line(current_editor.text_editor.get_line(line))
|
||||||
|
@ -13,6 +13,10 @@ config_version=4
|
|||||||
config/name="fileed"
|
config/name="fileed"
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
|
[editor_plugins]
|
||||||
|
|
||||||
|
enabled=PoolStringArray( "res://addons/file-editor/plugin.cfg" )
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
common/enable_pause_aware_picking=true
|
common/enable_pause_aware_picking=true
|
||||||
|
Loading…
Reference in New Issue
Block a user