=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.241 retrieving revision 1.243 diff -u -p -r1.241 -r1.243 --- mandoc/mdoc_term.c 2012/07/09 23:53:36 1.241 +++ mandoc/mdoc_term.c 2012/07/11 16:57:43 1.243 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.241 2012/07/09 23:53:36 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.243 2012/07/11 16:57:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012 Ingo Schwarze @@ -242,7 +242,7 @@ static const struct termact termacts[MDOC_MAX] = { { NULL, termp____post }, /* %Q */ { termp_sp_pre, NULL }, /* br */ { termp_sp_pre, NULL }, /* sp */ - { termp_under_pre, termp____post }, /* %U */ + { NULL, termp____post }, /* %U */ { NULL, NULL }, /* Ta */ }; @@ -727,12 +727,10 @@ termp_it_pre(DECL_ARGS) case (LIST_dash): /* FALLTHROUGH */ case (LIST_hyphen): - if (width < term_len(p, 4)) - width = term_len(p, 4); - break; + /* FALLTHROUGH */ case (LIST_enum): - if (width < term_len(p, 5)) - width = term_len(p, 5); + if (width < term_len(p, 2)) + width = term_len(p, 2); break; case (LIST_hang): if (0 == width) @@ -787,11 +785,17 @@ termp_it_pre(DECL_ARGS) */ switch (type) { + case (LIST_enum): + /* + * Weird special case. + * Very narrow enum lists actually hang. + */ + if (width == term_len(p, 2)) + p->flags |= TERMP_HANG; + /* FALLTHROUGH */ case (LIST_bullet): /* FALLTHROUGH */ case (LIST_dash): - /* FALLTHROUGH */ - case (LIST_enum): /* FALLTHROUGH */ case (LIST_hyphen): if (MDOC_HEAD == n->type)