From eeaec1ed883c1705e6ed93e9c2ce727516aaa1f7 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Wed, 19 Dec 2012 14:52:59 -0800 Subject: [PATCH] support nbsp in the pager. imported from http://svnweb.freebsd.org/ports/head/mail/mutt/files/patch-nbsp?revision=301308&view=markup --- pager.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pager.c b/pager.c index ade00c5f2..ece6e8b3e 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; -- 2.40.0