made the vt100 emulator not choke on most complicated inputs

This commit is contained in:
Izaya 2019-11-06 14:37:12 +11:00
parent 1c416be625
commit 4e276c9ccd
1 changed files with 4 additions and 4 deletions

View File

@ -61,16 +61,16 @@ function vt100emu(gpu) -- takes GPU component proxy *gpu* and returns a function
cx, cy = tonumber(tx), tonumber(ty)
mode = "n"
elseif cc == "A" then -- cursor up
cy = cy - tonumber(cs) or 1
cy = cy - (tonumber(cs) or 1)
mode = "n"
elseif cc == "B" then -- cursor down
cy = cy + tonumber(cs) or 1
cy = cy + (tonumber(cs) or 1)
mode = "n"
elseif cc == "C" then -- cursor right
cx = cx + tonumber(cs) or 1
cx = cx + (tonumber(cs) or 1)
mode = "n"
elseif cc == "D" then -- cursor left
cx = cx - tonumber(cs) or 1
cx = cx - (tonumber(cs) or 1)
mode = "n"
elseif cc == "h" and lc == "7" then -- enable line wrap
lw = true