summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-04 13:21:45 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-04 13:21:45 +0000
commit6f6927e6a5ffb72da4a382768a7d53d045cf5590 (patch)
treec02cc050fc7064614c8771bb50dd536f6ee18fa2
parentde12a3c94d73528ca77a6d4a2924953c96d34df0 (diff)
downloadmandoc-6f6927e6a5ffb72da4a382768a7d53d045cf5590.tar.gz
Have horizontal spanner not clobber pre-set width.
-rw-r--r--tbl_term.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tbl_term.c b/tbl_term.c
index 371f4e3b..6ee2d112 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -455,6 +455,7 @@ static void
tbl_calc_data(struct termp *tp, const struct tbl *tbl,
const struct tbl_dat *dp, struct termp_tbl *tblp)
{
+ int sz;
/* Branch down into data sub-types. */
@@ -462,7 +463,9 @@ tbl_calc_data(struct termp *tp, const struct tbl *tbl,
case (TBL_CELL_HORIZ):
/* FALLTHROUGH */
case (TBL_CELL_DHORIZ):
- tblp->width = term_len(tp, 1);
+ sz = term_len(tp, 1);
+ if (tblp->width < sz)
+ tblp->width = sz;
break;
case (TBL_CELL_LONG):
/* FALLTHROUGH */