=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.140 retrieving revision 1.142 diff -u -p -r1.140 -r1.142 --- mandoc/man_term.c 2014/02/16 12:33:39 1.140 +++ mandoc/man_term.c 2014/03/08 16:22:04 1.142 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.140 2014/02/16 12:33:39 schwarze Exp $ */ +/* $Id: man_term.c,v 1.142 2014/03/08 16:22:04 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -720,7 +720,7 @@ pre_TP(DECL_ARGS) /* Calculate offset. */ if (NULL != (nn = n->parent->head->child)) - if (nn->string && nn->parent->line == nn->line) + if (nn->string && 0 == (MAN_LINE & nn->flags)) if ((ival = a2width(p, nn->string)) >= 0) len = (size_t)ival; @@ -737,10 +737,15 @@ pre_TP(DECL_ARGS) mt->fl &= ~MANT_LITERAL; /* Don't print same-line elements. */ - for (nn = n->child; nn; nn = nn->next) - if (nn->line > n->line) - print_man_node(p, mt, nn, meta); + nn = n->child; + while (NULL != nn && 0 == (MAN_LINE & nn->flags)) + nn = nn->next; + while (NULL != nn) { + print_man_node(p, mt, nn, meta); + nn = nn->next; + } + if (savelit) mt->fl |= MANT_LITERAL; if (ival >= 0) @@ -1040,7 +1045,7 @@ out: * more specific than this. */ if (MANT_LITERAL & mt->fl && ! (TERMP_NOBREAK & p->flags) && - (NULL == n->next || n->next->line > n->line)) { + (NULL == n->next || MAN_LINE & n->next->flags)) { rm = p->rmargin; rmax = p->maxrmargin; p->rmargin = p->maxrmargin = TERM_MAXMARGIN;