=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -p -r1.103 -r1.104 --- mandoc/term.c 2009/09/23 11:02:21 1.103 +++ mandoc/term.c 2009/10/10 11:05:23 1.104 @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.103 2009/09/23 11:02:21 kristaps Exp $ */ +/* $Id: term.c,v 1.104 2009/10/10 11:05:23 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -159,7 +159,7 @@ void term_flushln(struct termp *p) { int i, j; - size_t vbl, vsz, vis, maxvis, mmax, bp; + size_t vbl, vsz, vis, maxvis, mmax, bp, os; static int overstep = 0; /* @@ -172,6 +172,9 @@ term_flushln(struct termp *p) assert(p->offset < p->rmargin); assert((int)(p->rmargin - p->offset) - overstep > 0); + /* Save the overstep. */ + os = (size_t)overstep; + maxvis = /* LINTED */ p->rmargin - p->offset - overstep; mmax = /* LINTED */ @@ -233,6 +236,9 @@ term_flushln(struct termp *p) putchar(' '); vis = 0; } + /* Remove the overstep width. */ + bp += os; + os = 0; } else { for (j = 0; j < (int)vbl; j++) putchar(' ');