=================================================================== RCS file: /cvs/mandoc/term_ps.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -p -r1.68 -r1.69 --- mandoc/term_ps.c 2014/10/28 17:36:19 1.68 +++ mandoc/term_ps.c 2014/11/20 13:56:20 1.69 @@ -1,4 +1,4 @@ -/* $Id: term_ps.c,v 1.68 2014/10/28 17:36:19 schwarze Exp $ */ +/* $Id: term_ps.c,v 1.69 2014/11/20 13:56:20 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -635,12 +635,14 @@ ps_setwidth(struct termp *p, int iop, size_t width) size_t lastwidth; lastwidth = p->ps->width; - if (0 < iop) + if (iop > 0) p->ps->width += width; - else if (0 > iop) + else if (iop == 0) + p->ps->width = width ? width : p->ps->lastwidth; + else if (p->ps->width > width) p->ps->width -= width; else - p->ps->width = width ? width : p->ps->lastwidth; + p->ps->width = 0; p->ps->lastwidth = lastwidth; }