=================================================================== RCS file: /cvs/mandoc/term_ascii.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -p -r1.25 -r1.26 --- mandoc/term_ascii.c 2014/04/20 16:46:05 1.25 +++ mandoc/term_ascii.c 2014/07/27 21:52:16 1.26 @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.25 2014/04/20 16:46:05 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.26 2014/07/27 21:52:16 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -269,7 +269,12 @@ locale_width(const struct termp *p, int c) { int rc; - return((rc = wcwidth(c)) < 0 ? 0 : rc); + if (c == ASCII_NBRSP) + c = ' '; + rc = wcwidth(c); + if (rc < 0) + rc = 0; + return(rc); } static void