diff options
Diffstat (limited to 'tbl_term.c')
-rw-r--r-- | tbl_term.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 */ |