=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man.c,v retrieving revision 1.111 retrieving revision 1.112 diff -c -r1.111 -r1.112 *** src/usr.bin/mandoc/man.c 2015/04/23 16:17:04 1.111 --- src/usr.bin/mandoc/man.c 2015/09/04 21:24:26 1.112 *************** *** 1,4 **** ! /* $OpenBSD: man.c,v 1.111 2015/04/23 16:17:04 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: man.c,v 1.112 2015/09/04 21:24:26 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015 Ingo Schwarze *************** *** 278,283 **** --- 278,297 ---- roff_node_delete(man, n); man->flags &= ~MAN_ELINE; + } + + /* + * Weird special case: + * Switching fill mode closes section headers. + */ + + if (man->flags & MAN_BLINE && + (tok == MAN_nf || tok == MAN_fi) && + (man->last->tok == MAN_SH || man->last->tok == MAN_SS)) { + n = man->last; + man_unscope(man, n); + roff_body_alloc(man, n->line, n->pos, n->tok); + man->flags &= ~MAN_BLINE; } /*