summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-21 12:47:52 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-21 12:47:52 +0000
commitee8726d2e6ca41905cd02fd38610926c7f8aed6d (patch)
treec0ebc3c7aa5ab6dea5bbf9c5a0d00b16612d7510
parent7fca6697e8daed5680867e259f8c5ce541a30582 (diff)
downloadmandoc-ee8726d2e6ca41905cd02fd38610926c7f8aed6d.tar.gz
Right-most column now fills to the right margin (undocumented groff behaviour).
-rw-r--r--mdoc_term.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 293c6501..cb48117b 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -27,7 +27,6 @@
#include "mdoc.h"
/* FIXME: macro arguments can be escaped. */
-/* FIXME: support more offset/width tokens. */
#define TTYPE_PROG 0
#define TTYPE_CMD_FLAG 1
@@ -927,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;