From 6f6927e6a5ffb72da4a382768a7d53d045cf5590 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 4 Jan 2011 13:21:45 +0000 Subject: Have horizontal spanner not clobber pre-set width. --- tbl_term.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tbl_term.c') 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 */ -- cgit