summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-12 22:05:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-12 22:05:57 +0000
commit47b33342700b5b79713ff7d6b2f804e7eb93e4fc (patch)
tree2fd4ce256f108fd4b1dab9e0bad0fc32b6cf4c93
parent6ae19af484763e4ea49a4054ab0a44a28ee85ac6 (diff)
downloadmandoc-47b33342700b5b79713ff7d6b2f804e7eb93e4fc.tar.gz
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.
-rw-r--r--out.c5
1 files 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);
}
}