summaryrefslogtreecommitdiffstats
path: root/tbl_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'tbl_term.c')
-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 */