diff --git a/res/layouts/console.xml b/res/layouts/console.xml
index bc5fb343..9d015aab 100644
--- a/res/layouts/console.xml
+++ b/res/layouts/console.xml
@@ -83,8 +83,13 @@
-
-
+
+
diff --git a/res/layouts/console.xml.lua b/res/layouts/console.xml.lua
index cc9d7147..891fb577 100644
--- a/res/layouts/console.xml.lua
+++ b/res/layouts/console.xml.lua
@@ -149,9 +149,9 @@ function run_current_file()
clear_output()
if not chunk then
local line, message = err:match(".*:(%d*): (.*)")
- document.output:add(
+ document.output:paste(
string.format(
- "",
+ "\n[#FF3030]%s: %s[#FFFFFF]",
gui.str("Error at line %{0}"):gsub("%%{0}", line), message)
)
return
@@ -176,11 +176,7 @@ function run_current_file()
}
func = funcs[script_type] or func
local output = core.capture_output(function() func(unit) end)
- document.output:add(
- string.format(
- "",
- output)
- )
+ document.output:paste(string.format("\n%s", output))
end
function save_current_file()
@@ -220,8 +216,8 @@ end
function clear_output()
local output = document.output
- output:clear()
- output:add("")
+ output.text = ""
+ output:paste("[#FFFFFF80]"..gui.str("devtools.output").."[#FFFFFF]")
end
events.on("core:open_traceback", function(traceback_b64)