made tabs 8 chars wide

This commit is contained in:
Izaya 2017-08-03 17:52:10 +10:00
parent b390e2764b
commit 0db4fdee01
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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