From 4bc986fa96324ee09d30cc0b01690a266ddcf00f Mon Sep 17 00:00:00 2001 From: Rocco Rutte Date: Sat, 11 Jul 2009 14:38:52 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ curs_lib.c | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff5901cc9..4b97e74e2 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 0308086c6..43a563c06 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; } } -- 2.50.0