aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_term.c
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
commitdf93d3ceecb1d865ef7249ba9348370ffc024e60 (patch)
tree6d446947e0df129c6724c0dcd9cd8a1e0d6e3c81 /tbl_term.c
parente1e53a5041474d08cef466b93f70aa52c798a0ae (diff)
downloadmandoc-df93d3ceecb1d865ef7249ba9348370ffc024e60.tar.gz
mandoc-df93d3ceecb1d865ef7249ba9348370ffc024e60.tar.zst
mandoc-df93d3ceecb1d865ef7249ba9348370ffc024e60.zip
Have horizontal spanner not clobber pre-set width.
Diffstat (limited to 'tbl_term.c')
-rw-r--r--tbl_term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tbl_term.c b/tbl_term.c
index d6c27668..a6c78e1d 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_term.c,v 1.8 2011/01/04 13:14:26 kristaps Exp $ */
+/* $Id: tbl_term.c,v 1.9 2011/01/04 13:21:45 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 */