1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-22 03:54:20 -05:00

fixed <ESC>[n;nH scrolling the display

This commit is contained in:
XeonSquared 2020-04-12 03:49:14 +10:00
parent fc127f8d3e
commit 0dd13b74f1

View File

@ -74,7 +74,7 @@ function vtansi.vtemu(gpu) -- takes GPU component proxy *gpu* and returns a func
tA[#tA+1] = tonumber(s) tA[#tA+1] = tonumber(s)
end end
if cc == "H" then if cc == "H" then
cx, cy = tA[1] or 1, tA[2] or 1 cx, cy = math.min(mx,tA[1] or 1), math.min(my,tA[2] or 1)
elseif cc == "A" then elseif cc == "A" then
cy = cy - (tA[1] or 1) cy = cy - (tA[1] or 1)
elseif cc == "B" then elseif cc == "B" then
@ -89,6 +89,7 @@ function vtansi.vtemu(gpu) -- takes GPU component proxy *gpu* and returns a func
cx, cy = sx, sy cx, cy = sx, sy
elseif cc == "n" and tA[1] == 6 then elseif cc == "n" and tA[1] == 6 then
rs = string.format("%s\27[%d;%dR",rs,cx,cy) rs = string.format("%s\27[%d;%dR",rs,cx,cy)
dprint(string.format("reporting %d;%d as current cursor position",cx,cy))
elseif cc == "K" and tA[1] == 1 then elseif cc == "K" and tA[1] == 1 then
gpu.fill(1,cy,cx,1," ") gpu.fill(1,cy,cx,1," ")
elseif cc == "K" and tA[1] == 2 then elseif cc == "K" and tA[1] == 2 then