=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.74 retrieving revision 1.77 diff -u -p -r1.74 -r1.77 --- mandoc/term.c 2009/04/12 19:45:26 1.74 +++ mandoc/term.c 2009/06/11 07:46:41 1.77 @@ -1,6 +1,6 @@ -/* $Id: term.c,v 1.74 2009/04/12 19:45:26 kristaps Exp $ */ +/* $Id: term.c,v 1.77 2009/06/11 07:46:41 kristaps Exp $ */ /* - * Copyright (c) 2008, 2009 Kristaps Dzonsons + * Copyright (c) 2008, 2009 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -106,7 +106,7 @@ term_alloc(enum termenc enc) if (NULL == (p = malloc(sizeof(struct termp)))) err(1, "malloc"); bzero(p, sizeof(struct termp)); - p->maxrmargin = 78; + p->maxrmargin = 80; p->enc = enc; return(p); } @@ -278,16 +278,15 @@ term_flushln(struct termp *p) * our breakpoint. */ + if (0 < vis++) + putchar(' '); + for ( ; i < (int)p->col; i++) { if (' ' == p->buf[i]) break; putchar(p->buf[i]); } vis += vsz; - if (i < (int)p->col && vis <= bp) { - putchar(' '); - vis++; - } } /* @@ -312,7 +311,7 @@ term_flushln(struct termp *p) if (p->flags & TERMP_NOBREAK) { if ( ! (TERMP_NONOBREAK & p->flags)) - for ( ; vis < maxvis; vis++) + for ( ; vis <= maxvis; vis++) putchar(' '); } else putchar('\n');