From 4e276c9ccdb83798771997891421005a1a6de4c1 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Wed, 6 Nov 2019 14:37:12 +1100 Subject: [PATCH] made the vt100 emulator not choke on most complicated inputs --- module/vt100.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/vt100.lua b/module/vt100.lua index b7ef1a8..3522fdc 100644 --- a/module/vt100.lua +++ b/module/vt100.lua @@ -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