summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-08-09 19:01:25 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-08-09 19:01:25 +0000
commit58a34417f423032b7eeb55c983f3df250bc315f8 (patch)
treeea483f438526a64efa18f2098afb61c938db6c80 /usr.bin/mandoc/mdoc_term.c
parent5d7b66a78ff2dc9dd3a701515d7edd4b176219a5 (diff)
sync to 1.8.3: right-most column now fills to the right margin
(undocumented groff behaviour)
Diffstat (limited to 'usr.bin/mandoc/mdoc_term.c')
-rw-r--r--usr.bin/mandoc/mdoc_term.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 5c69bda1e7b..f27f2764aed 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.42 2009/08/09 18:43:28 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.43 2009/08/09 19:01:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -926,6 +926,13 @@ termp_it_pre(DECL_ARGS)
case (MDOC_Column):
assert(width);
p->rmargin = p->offset + width;
+ /*
+ * XXX - this behaviour is not documented: the
+ * right-most column is filled to the right margin.
+ */
+ if (MDOC_HEAD == node->type &&
+ MDOC_BODY == node->next->type)
+ p->rmargin = p->maxrmargin;
break;
default:
break;