From: Michael Elkins Date: Wed, 19 Dec 2012 22:52:59 +0000 (-0800) Subject: support nbsp in the pager. X-Git-Tag: mutt-1-5-22-rel~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eab03d4bda4bb61fb924ff8d0b1a3fd612ec2d22;p=mutt support nbsp in the pager. imported from http://svnweb.freebsd.org/ports/head/mail/mutt/files/patch-nbsp?revision=301308&view=markup --- diff --git a/pager.c b/pager.c index ade00c5f..ece6e8b3 100644 --- a/pager.c +++ b/pager.c @@ -1187,10 +1187,17 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, last_special = special; } - if (IsWPrint (wc)) + if (IsWPrint (wc) || (Charset_is_utf8 && wc == 0x00A0)) { if (wc == ' ') space = ch; + else if (Charset_is_utf8 && wc == 0x00A0) + { + /* Convert non-breaking space to normal space. The local variable + * `space' is not set here so that the caller of this function won't + * attempt to wrap at this character. */ + wc = ' '; + } t = wcwidth (wc); if (col + t > wrap_cols) break;