From: Rocco Rutte Date: Sat, 11 Jul 2009 12:38:52 +0000 (+0200) Subject: Render blanks to spaces in index, fixes [298194c414f0] X-Git-Tag: mutt-1-5-21-rel~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d02c90b654afdcad7e82605a79eff509e206736;p=mutt Render blanks to spaces in index, fixes [298194c414f0] wcwidth() returns -1 so 'foobar' was rendered to 'foobar', and now to 'foo bar'. Closes #3270 again. --- diff --git a/ChangeLog b/ChangeLog index ff5901cc..4b97e74e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-07-08 13:37 +0200 Rocco Rutte (f22b71d8005a) + + * mbyte.c: Fix compiler warning + +2009-07-07 15:03 +0200 Rocco Rutte (d5e03a46518c) + + * TODO: Update TODO + 2009-07-07 10:49 +0200 Matthias Andree (cc4d6044b31e) * INSTALL: GNU-make based VPATH builds work. diff --git a/curs_lib.c b/curs_lib.c index 0308086c..43a563c0 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -725,11 +725,12 @@ void mutt_format_string (char *dest, size_t destlen, w = 1; /* hack */ else { - if (!IsWPrint (wc) #ifdef HAVE_ISWBLANK - && !iswblank (wc) + if (iswblank (wc)) + wc = ' '; + else #endif - ) + if (!IsWPrint (wc)) wc = '?'; w = wcwidth (wc); } @@ -740,7 +741,7 @@ void mutt_format_string (char *dest, size_t destlen, min_width -= w; max_width -= w; strncpy (p, scratch, k2); - p += k2; + p += k2; destlen -= k2; } }