summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-08 04:40:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-08 04:40:47 +0000
commit81e410d5cc6949664a4174586c47ce9d26bd323f (patch)
tree151d3e41d4fcb3dae26114630d4f7c15d5eed4d1 /mdoc_term.c
parent4ceb7196c5a7cbee79cd5e93dee6f864e9b35949 (diff)
downloadmandoc-81e410d5cc6949664a4174586c47ce9d26bd323f.tar.gz
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.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index e6d85e8e..d214b22e 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -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);
}