From df93d3ceecb1d865ef7249ba9348370ffc024e60 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tbl_term.c') 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 * @@ -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 v1.2.3-56-ge451