From 0db4fdee01d0f9d45697f8a3fd4b47c7e717bea3 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 3 Aug 2017 17:52:10 +1000 Subject: [PATCH] made tabs 8 chars wide --- 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 b974161..25f0434 100644 --- a/modules/drivers/tty.lua +++ b/modules/drivers/tty.lua @@ -27,7 +27,7 @@ function tty(gA,sA,sI,fg,bg) -- gpuAddress,screenAddress,sessionID,foreground,ba if c == "\n" then cx,cy=1,cy+1 elseif c == "\r" then cx=1 elseif c == "\f" then cx=1 cy=1 gP.fill(1, 1, sx, sy, " ") - elseif c == "\t" then cx=(cx+4-((cx+4)%4))+1 + elseif c == "\t" then cx=(cx+8-((cx+8)%8))+1 elseif c == "\127" or c == "\008" then cx=cx-1 gP.set(cx,cy," ") else gP.set(cx,cy,c) cx=cx+1 end cv() diff --git a/modules/drivers/vt52.lua b/modules/drivers/vt52.lua index 48bc3ce..7ffc5ee 100644 --- a/modules/drivers/vt52.lua +++ b/modules/drivers/vt52.lua @@ -52,7 +52,7 @@ function tty(gA,sA,sI,fg,bg) elseif c == "\27" then cm=1 elseif c == "\r" then cx=1 elseif c == "\f" then cx=1 cy=1 gP.fill(1, 1, sx, sy, " ") - elseif c == "\t" then cx=(cx+4-((cx+4)%4))+1 + elseif c == "\t" then cx=(cx+8-((cx+8)%8))+1 elseif c == "\127" then cx=cx-1 gP.set(cx,cy," ") else gP.set(cx,cy,c) cx=cx+1 end