From: Kevin McCarthy Date: Thu, 7 Jul 2016 16:21:04 +0000 (-0700) Subject: Filter soft hypen from pager and headers. (closes #3848) X-Git-Tag: neomutt-20160822~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0585a72080881fddefa9479796e010f14f243885;p=neomutt Filter soft hypen from pager and headers. (closes #3848) Add U+00AD SOFT HYPHEN to the filtered characters in headers and the pager. In some terminals and situations it causes major display problems. --- diff --git a/mbyte.c b/mbyte.c index adea5f43e..d476a3a89 100644 --- a/mbyte.c +++ b/mbyte.c @@ -550,9 +550,11 @@ int mutt_filter_unprintable (char **s) wc = '?'; /* Filter out the RIGHT-TO-LEFT and LEFT-TO-RIGHT bidi markers because * they result in screen corruption. See ticket #3827. + * Filter soft-hypen. See ticket #3848. */ else if (Charset_is_utf8 && - ((wc == (wchar_t)0x200f) || (wc == (wchar_t)0x200e))) + ((wc == (wchar_t)0x200f) || (wc == (wchar_t)0x200e) || + (wc == (wchar_t)0x00ad))) continue; k2 = wcrtomb (scratch, wc, &mbstate2); scratch[k2] = '\0'; diff --git a/pager.c b/pager.c index f256a4ed1..e6ee9392e 100644 --- a/pager.c +++ b/pager.c @@ -1156,10 +1156,11 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, dprint (3, (debugfile, "skip zero-width character U+%04X\n", (unsigned short)wc)); continue; } - /* Filter bidi markers, see ticket #3827 */ - if (wc == (wchar_t)0x200f || wc == (wchar_t)0x200e) + /* Filter bidi markers, see ticket #3827 + Filter soft hyphen, see ticket #3848 */ + if (wc == (wchar_t)0x200f || wc == (wchar_t)0x200e || wc == (wchar_t)0x00ad) { - dprint (3, (debugfile, "skip bidi marker U+%04X\n", (unsigned short)wc)); + dprint (3, (debugfile, "filtered U+%04X\n", (unsigned short)wc)); continue; } }