From 6b62292dd1e864cde25a8688363424b77603e622 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Wed, 9 Jan 2019 16:16:53 +1100 Subject: [PATCH] fixed the backspacing past the start bug mostly --- module/vt-task.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/vt-task.lua b/module/vt-task.lua index 0e407d3..2e89848 100644 --- a/module/vt-task.lua +++ b/module/vt-task.lua @@ -12,9 +12,11 @@ function vtemu(gpua,scra) local ty,ka,ch = coroutine.yield() if ty == "key_down" and kba[ka] then if ch == 13 then ch = 10 end - if ch == 8 and buf:len() > 0 then - write("\8 \8") - buf = buf:sub(1,-2) + if ch == 8 then + if buf:len() > 0 then + write("\8 \8") + buf = buf:sub(1,-2) + end elseif ch > 0 then write(string.char(ch)) buf = buf .. string.char(ch)