From f14f29a00a684110963cf0c5897b775f71c5a8fb Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sat, 15 Jul 2017 15:06:17 +1000 Subject: [PATCH] made both tty variants handle multi-line text input lots better --- modules/drivers/tty.lua | 2 +- modules/drivers/vt52.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/drivers/tty.lua b/modules/drivers/tty.lua index 71539f1..3cfa4be 100644 --- a/modules/drivers/tty.lua +++ b/modules/drivers/tty.lua @@ -8,7 +8,7 @@ function tty(gA,sA,sI,fg,bg) gP.fill(1,1,sx,sy," ") local function cv() if cx > sx then cx,cy=1,cy+1 end - if cx < 1 then cx,cy=1,cy-1 end + if cx < 1 then cx,cy=sx,cy-1 end if cy < 1 then cx,cy=1,1 end if cy > sy then gP.copy(1,2,sx,sy-1,0,-1) gP.fill(1,sy,sx,1," ") cx,cy=1,sy end end diff --git a/modules/drivers/vt52.lua b/modules/drivers/vt52.lua index e729303..2ac5409 100644 --- a/modules/drivers/vt52.lua +++ b/modules/drivers/vt52.lua @@ -8,7 +8,7 @@ function tty(gA,sA,sI,fg,bg) gP.fill(1,1,sx,sy," ") local function cv() if cx > sx then cx,cy=1,cy+1 end - if cx < 1 then cx,cy=1,cy-1 end + if cx < 1 then cx,cy=sx,cy-1 end if cy < 1 then cx,cy=1,1 end if cy > sy then gP.copy(1,2,sx,sy-1,0,-1) gP.fill(1,sy,sx,1," ") cx,cy=1,sy end end