From 47b33342700b5b79713ff7d6b2f804e7eb93e4fc Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 12 Jun 2017 22:05:57 +0000 Subject: If a tbl(7) layout contains a 'w' (minimum width) modifier for a given column, that column contains no literal or numeric cell of larger width, and all text block cells in that column can be line wrapped to fit into that minimum width, groff does not increase that column width beyond the specified minimum: so do the same. --- out.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/out.c b/out.c index 5da58c6a..e8916b5e 100644 --- a/out.c +++ b/out.c @@ -157,8 +157,9 @@ tblcalc(struct rofftbl *tbl, const struct tbl_span *sp, if (col->width < dp->layout->width) col->width = dp->layout->width; tblcalc_data(tbl, col, opts, dp, - rmargin && dp->block ? - rmargin / (sp->opts->cols + 1) : 0); + dp->block == 0 ? 0 : + dp->layout->width ? dp->layout->width : + rmargin ? rmargin / (sp->opts->cols + 1) : 0); } } -- cgit