* mdocml: Even for UTF-8 output, a non-breaking space character has the
@ 2014-07-27 21:52 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-07-27 21:52 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-27 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-27 21:52 mdocml: Even for UTF-8 output, a non-breaking space character has the schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).