From 4a73f17afb66c14ec34b806d0b4ee5dd5ea56ed2 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 10 Oct 2009 11:05:23 +0000 Subject: Fix hang lists in -Tascii -Tmdoc, which seem to have been broken since ~1.8.x. Noted similarity of HP/TP and -hang/-tag in mandoc.1. --- term.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 0a7739da..9ac3039f 100644 --- a/term.c +++ b/term.c @@ -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(' '); -- cgit v1.2.3-56-ge451