=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.167 retrieving revision 1.168 diff -u -p -r1.167 -r1.168 --- mandoc/term.c 2010/08/20 01:02:07 1.167 +++ mandoc/term.c 2010/08/20 23:22:09 1.168 @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.167 2010/08/20 01:02:07 schwarze Exp $ */ +/* $Id: term.c,v 1.168 2010/08/20 23:22:09 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -274,6 +274,12 @@ term_flushln(struct termp *p) vend += vbl; vis = vend; } + + /* + * If there was trailing white space, it was not printed; + * so reset the cursor position accordingly. + */ + vis -= vbl; p->col = 0; p->overstep = 0;