textbox autoresize

This commit is contained in:
MihailRis
2024-05-14 05:05:13 +03:00
parent ea2b77b323
commit 8bf65eef1a
6 changed files with 164 additions and 81 deletions
+6 -2
View File
@@ -10,11 +10,15 @@ function submit(text)
local status, result = pcall(function() return console.execute(text) end)
if result ~= nil then
document.log.text = document.log.text..tostring(result)..'\n'
local prevtext = document.log.text
if #prevtext == 0 then
document.log:paste(tostring(result))
else
document.log:paste('\n'..tostring(result))
end
end
document.prompt.text = ""
document.prompt.focused = true
print(document.log.pos)
end
function on_open()