Updated ScriptEditor

Ensure that when we fetch the source code from the editor, we replace
any tab characters with 4 spaces.
This commit is contained in:
Mario Steele 2026-03-02 02:18:06 -06:00
parent ba537bc791
commit 199f2cdc9d

View file

@ -11,7 +11,7 @@ func _ready() -> void:
func _handle_run_script() -> void: func _handle_run_script() -> void:
var script = GDScript.new() var script = GDScript.new()
script.source_code = %CodeEditor.text script.source_code = %CodeEditor.text.replace("\t"," ")
var error := script.reload() var error := script.reload()
if error != OK: if error != OK:
print("Failed to parse script!") print("Failed to parse script!")