summaryrefslogtreecommitdiffstatshomepage
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
commitff6450df2b770952b864bc2e5ea77ed33f92c934 (patch)
treee33bc3fa731fdc40db69b957cd01a11db4280ecf
parentc38a510a7ce5ed10e16d0e2fc5c9033159652382 (diff)
downloadmandoc-ff6450df2b770952b864bc2e5ea77ed33f92c934.tar.gz
mandoc-ff6450df2b770952b864bc2e5ea77ed33f92c934.tar.zst
mandoc-ff6450df2b770952b864bc2e5ea77ed33f92c934.zip
Right-most column now fills to the right margin (undocumented groff behaviour).
-rw-r--r--mdoc_term.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 31af0040..bdd63db5 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.49 2009/07/20 19:30:46 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.50 2009/07/21 12:47:52 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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;