We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e4d581 commit ca64769Copy full SHA for ca64769
addons/lua-gdextension/lua_repl.gd
@@ -39,7 +39,17 @@ func reset():
39
_lua = LuaState.new()
40
_lua.open_libraries()
41
_lua.registry.print = _printn
42
- _lua.do_string(r"print = function(...) debug.getregistry().print(table.concat({...}, '\t')) end")
+ _lua.load_string(r"""
43
+ local tab_size = ...
44
+ local indent = string.rep(' ', tab_size)
45
+ print = function(...)
46
+ local args = {...}
47
+ for i = 1, #args do
48
+ args[i] = tostring(args[i])
49
+ end
50
+ debug.getregistry().print(table.concat(args, indent))
51
52
+ """).invoke(_output.tab_size)
53
54
_history.clear()
55
_current_history = 0
0 commit comments