From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s6RLqLsF014174 for ; Sun, 27 Jul 2014 17:52:22 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s6RLqGl9007658; Sun, 27 Jul 2014 17:52:16 -0400 (EDT) Date: Sun, 27 Jul 2014 17:52:16 -0400 (EDT) Message-Id: <201407272152.s6RLqGl9007658@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Even for UTF-8 output, a non-breaking space character has the X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Even for UTF-8 output, a non-breaking space character has the same width as a normal space character, and not width 0. Bug reported by bentley@. Modified Files: -------------- mdocml: term_ascii.c Revision Data ------------- Index: term_ascii.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ascii.c,v retrieving revision 1.25 retrieving revision 1.26 diff -Lterm_ascii.c -Lterm_ascii.c -u -p -r1.25 -r1.26 --- term_ascii.c +++ term_ascii.c @@ -269,7 +269,12 @@ locale_width(const struct termp *p, int { 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 -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv