diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-10 11:05:23 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-10 11:05:23 +0000 |
commit | 4a73f17afb66c14ec34b806d0b4ee5dd5ea56ed2 (patch) | |
tree | e37b27f3eb3c05aedc6ca1578c0f6fc6034b994f /term.c | |
parent | 57d713154a86ae733a986dfc0f7e95a3bc7917c3 (diff) | |
download | mandoc-4a73f17afb66c14ec34b806d0b4ee5dd5ea56ed2.tar.gz mandoc-4a73f17afb66c14ec34b806d0b4ee5dd5ea56ed2.tar.zst mandoc-4a73f17afb66c14ec34b806d0b4ee5dd5ea56ed2.zip |
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.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 <kristaps@kth.se> * @@ -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(' '); |