1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Increased tab size from 4 to 8.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-09-08 15:06:10 +02:00
parent bde41a37ec
commit 32a1be0008
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ void TextTerminal::Tab(TextBuffer* textbuf)
Newline(textbuf);
// TODO: This does not work correctly if the text buffer width is not a
// multiple of four and the column is near the edge.
unsigned until = 4 - (column % 4);
unsigned until = 8 - (column % 8);
textbuf->SetCharAttr(TextPos(column, line), ATTR_CHAR);
while ( (until--) != 0 )
textbuf->SetChar(TextPos(column++, line), TextChar(' ', vgacolor));

View file

@ -110,7 +110,7 @@ int main(int argc, char* argv[])
if ( eol && linesleft ) { linesleft--; }
printf("%c", c);
charleft--;
if ( c == '\t' ) { charleft &= ~(4-1); }
if ( c == '\t' ) { charleft &= ~(8-1); }
}
}
if ( fd != stdinfd ) { close(fd); }