=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_term.c,v retrieving revision 1.143 retrieving revision 1.144 diff -c -r1.143 -r1.144 *** src/usr.bin/mandoc/mdoc_term.c 2012/07/09 23:52:47 1.143 --- src/usr.bin/mandoc/mdoc_term.c 2012/07/10 14:35:57 1.144 *************** *** 1,4 **** ! /* $Id: mdoc_term.c,v 1.143 2012/07/09 23:52:47 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012 Ingo Schwarze --- 1,4 ---- ! /* $Id: mdoc_term.c,v 1.144 2012/07/10 14:35:57 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012 Ingo Schwarze *************** *** 723,734 **** case (LIST_dash): /* FALLTHROUGH */ case (LIST_hyphen): ! if (width < term_len(p, 4)) ! width = term_len(p, 4); ! break; case (LIST_enum): ! if (width < term_len(p, 5)) ! width = term_len(p, 5); break; case (LIST_hang): if (0 == width) --- 723,732 ---- case (LIST_dash): /* FALLTHROUGH */ case (LIST_hyphen): ! /* FALLTHROUGH */ case (LIST_enum): ! if (width < term_len(p, 2)) ! width = term_len(p, 2); break; case (LIST_hang): if (0 == width) *************** *** 783,793 **** */ switch (type) { case (LIST_bullet): /* FALLTHROUGH */ case (LIST_dash): - /* FALLTHROUGH */ - case (LIST_enum): /* FALLTHROUGH */ case (LIST_hyphen): if (MDOC_HEAD == n->type) --- 781,797 ---- */ 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_hyphen): if (MDOC_HEAD == n->type)