=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.175 retrieving revision 1.177 diff -u -p -r1.175 -r1.177 --- mandoc/man_term.c 2015/04/04 17:47:18 1.175 +++ mandoc/man_term.c 2015/04/06 13:35:08 1.177 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.175 2015/04/04 17:47:18 schwarze Exp $ */ +/* $Id: man_term.c,v 1.177 2015/04/06 13:35:08 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -768,9 +768,15 @@ pre_SS(DECL_ARGS) case ROFFT_HEAD: term_fontrepl(p, TERMFONT_BOLD); p->offset = term_len(p, 3); + p->rmargin = mt->offset; + p->trailspace = mt->offset; + p->flags |= TERMP_NOBREAK | TERMP_BRIND; break; case ROFFT_BODY: p->offset = mt->offset; + p->rmargin = p->maxrmargin; + p->trailspace = 0; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); break; default: break; @@ -823,9 +829,15 @@ pre_SH(DECL_ARGS) case ROFFT_HEAD: term_fontrepl(p, TERMFONT_BOLD); p->offset = 0; + p->rmargin = mt->offset; + p->trailspace = mt->offset; + p->flags |= TERMP_NOBREAK | TERMP_BRIND; break; case ROFFT_BODY: p->offset = mt->offset; + p->rmargin = p->maxrmargin; + p->trailspace = 0; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); break; default: break; @@ -867,7 +879,9 @@ pre_RS(DECL_ARGS) n = n->parent->head; n->aux = SHRT_MAX + 1; - if (n->child != NULL && a2roffsu(n->child->string, &su, SCALE_EN)) + if (n->child == NULL) + n->aux = mt->lmargin[mt->lmargincur]; + else if (a2roffsu(n->child->string, &su, SCALE_EN)) n->aux = term_hspan(p, &su) / 24; if (n->aux < 0 && (size_t)(-n->aux) > mt->offset) n->aux = -mt->offset;