diff --git a/modules/drivers/vt52.lua b/modules/drivers/vt52.lua index 4cf1617..c5b2046 100644 --- a/modules/drivers/vt52.lua +++ b/modules/drivers/vt52.lua @@ -1,6 +1,7 @@ function tty(gA,sA,sI,fg,bg) local gP,cx,cy,bg,fg = component.proxy(gA),1,1,bg or 0x000000, fg or 0xffffff gP.bind(sA) + gP.cs = sA local sx, sy = gP.getResolution() gP.setResolution(sx,sy) gP.setForeground(fg) @@ -23,6 +24,10 @@ function tty(gA,sA,sI,fg,bg) gP.setBackground(bG) end local function wl(str) + if gP.cs ~= sA then + gP.bind(sA) + gP.cs = sA + end local cm = 0 for c in str:gmatch(".") do if cm == 1 then