|
|
@@ -45,9 +45,7 @@ function vt100emu(gpu) -- takes GPU component proxy *gpu* and returns a function |
|
|
|
gpu.set(cx,cy,pc) |
|
|
|
for cc in s:gmatch(".") do |
|
|
|
if mode == 0 then |
|
|
|
if string.byte(cc) > 31 and string.byte(cc) < 128 then -- probably printable |
|
|
|
wb = wb .. cc |
|
|
|
elseif cc == "\n" then |
|
|
|
if cc == "\n" then |
|
|
|
flushwb() |
|
|
|
cx,cy = 1, cy+1 |
|
|
|
elseif cc == "\t" then |
|
|
@@ -55,6 +53,8 @@ function vt100emu(gpu) -- takes GPU component proxy *gpu* and returns a function |
|
|
|
elseif cc == "\27" then |
|
|
|
flushwb() |
|
|
|
mode = 1 |
|
|
|
else |
|
|
|
wb = wb .. cc |
|
|
|
end |
|
|
|
elseif mode == 1 then |
|
|
|
if cc == "[" then |
|
|
@@ -122,6 +122,7 @@ function vt100emu(gpu) -- takes GPU component proxy *gpu* and returns a function |
|
|
|
end |
|
|
|
end |
|
|
|
flushwb() |
|
|
|
checkCursor() |
|
|
|
pc = gpu.get(cx,cy) |
|
|
|
gpu.setForeground(bg) |
|
|
|
gpu.setBackground(fg) |
|
|
|