From ff6450df2b770952b864bc2e5ea77ed33f92c934 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 21 Jul 2009 12:47:52 +0000 Subject: Right-most column now fills to the right margin (undocumented groff behaviour). --- mdoc_term.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mdoc_term.c') 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 * @@ -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; -- cgit v1.2.3