From 709b7fb992d4f811c43adf26b765eab07f1e0a87 Mon Sep 17 00:00:00 2001 From: neru Date: Thu, 8 May 2025 13:03:35 -0300 Subject: [PATCH] style: format --- lua/CC Tweaked/tutel/tutel-host.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/CC Tweaked/tutel/tutel-host.lua b/lua/CC Tweaked/tutel/tutel-host.lua index fff35dc..fd9c376 100644 --- a/lua/CC Tweaked/tutel/tutel-host.lua +++ b/lua/CC Tweaked/tutel/tutel-host.lua @@ -258,10 +258,10 @@ function drawConsole(y) end - function handleConsoleInput(char) - commandBuffer = commandBuffer..char + commandBuffer = commandBuffer .. char end + registerEventListener("char", handleConsoleInput) function handleConsoleKeys(key) @@ -271,6 +271,7 @@ function handleConsoleKeys(key) commandBuffer = "" end end + registerEventListener("key", handleConsoleKeys) --[[ @@ -352,7 +353,7 @@ end function drawCommandBar(w, y) term.setCursorPos(1, y) - + term.setBackgroundColor(colors.white) term.setTextColor(colors.gray) @@ -361,7 +362,7 @@ function drawCommandBar(w, y) term.write("$ ") local startingIndex = commandBuffer:len() - w - 3 - if startingIndex < 0 then + if startingIndex < 0 then startingIndex = 0 end