summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-08 07:13:11 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-08 07:13:11 +0000
commitb89bb1378a92c68b93b6d3450cbda691e289d6c6 (patch)
tree6646ba4605d5152e9bb746137497d1ef343bc505 /man_term.c
parent81e410d5cc6949664a4174586c47ce9d26bd323f (diff)
downloadmandoc-b89bb1378a92c68b93b6d3450cbda691e289d6c6.tar.gz
Add a new term_flushln() flag TERMP_BRIND (if break, then indent)
to control indentation of continuation lines in TERMP_NOBREAK mode. In the past, this was always on; continue using it for .Bl, .Nm, .Fn, .Fo, and .HP, but no longer for .IP and .TP. I looked at this because sthen@ reported the issue in a manual of a Perl module from ports, but it affects base, too: This patch reduces groff-mandoc differences in base by more than 15%.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/man_term.c b/man_term.c
index a8e8971f..281c2e56 100644
--- a/man_term.c
+++ b/man_term.c
@@ -278,7 +278,7 @@ pre_literal(DECL_ARGS)
p->offset = p->rmargin;
p->rmargin = p->maxrmargin;
p->trailspace = 0;
- p->flags &= ~TERMP_NOBREAK;
+ p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND);
p->flags |= TERMP_NOSPACE;
}
@@ -547,7 +547,7 @@ pre_HP(DECL_ARGS)
}
if ( ! (MANT_LITERAL & mt->fl)) {
- p->flags |= TERMP_NOBREAK;
+ p->flags |= TERMP_NOBREAK | TERMP_BRIND;
p->trailspace = 2;
}
@@ -582,7 +582,7 @@ post_HP(DECL_ARGS)
switch (n->type) {
case (MAN_BODY):
term_newln(p);
- p->flags &= ~TERMP_NOBREAK;
+ p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND);
p->trailspace = 0;
p->offset = mt->offset;
p->rmargin = p->maxrmargin;