From afd2d83121837880082344a1125e3e44aa078d3e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 8 Apr 2014 04:40:47 +0000 Subject: If the SYNOPSIS section contains an excessively long .Nm, adjust the right margin to avoid running into an assertion; output in that case now agrees with groff, too. --- mdoc_term.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index aa29274f..85314f6f 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.261 2014/03/30 21:28:01 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.262 2014/04/08 04:40:47 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -1029,6 +1029,8 @@ termp_nm_pre(DECL_ARGS) MDOC_TEXT == n->prev->child->type ? term_strlen(p, n->prev->child->string) : term_len(p, 5)); + if (p->rmargin < p->offset) + p->rmargin = p->offset; return(1); } -- cgit v1.2.3