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

Fixed bug where pager(1) prints a line too much.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-03-11 18:16:55 +01:00
parent 5e317c9726
commit a6a296a971

View file

@ -80,7 +80,7 @@ int main(int argc, char* argv[])
if ( c == '\n' ) { charleft = WIDTH; }
bool eol = (c == '\n') || !charleft;
if ( eol ) { charleft = WIDTH; }
if ( eol && !linesleft )
if ( eol && linesleft <= 1 )
{
printf("\n--pager--");
fflush(stdout);