From 3dd53e4cb80fd56800af2570b55975d91b4d4c06 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'term.c') diff --git a/term.c b/term.c index 2392a621..91638e25 100644 --- a/term.c +++ b/term.c @@ -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