changeset: 6601:6e0aca94cdb0 user: Kevin McCarthy <ke...@8t8.us> date: Wed Mar 30 13:16:20 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/6e0aca94cdb0
Filter out bidi marks in rfc2047 and rfc2231 encoding. (see #3827) Filter out U+200F RIGHT-TO-LEFT MARK and U+200E LEFT-TO-RIGHT MARK in rfc2047 and 2231 encoded fields. GNU Screen has a bug that corrupts the display, and can cause the wrong email to appear to be selected in the index. Until screen fixes the issue, filter it out in mutt. diffs (18 lines): diff -r 96b7714fef87 -r 6e0aca94cdb0 mbyte.c --- a/mbyte.c Tue Mar 29 14:07:51 2016 -0700 +++ b/mbyte.c Wed Mar 30 13:16:20 2016 -0700 @@ -548,6 +548,14 @@ } if (!IsWPrint (wc)) wc = '?'; + /* HACK: + * Work around a gnu screen bug. See ticket #3827. + * Filter out the RIGHT-TO-LEFT and LEFT-TO-RIGHT bidi marks because + * they result in screen corruption. + */ + else if (Charset_is_utf8 && + ((wc == (wchar_t)0x200f) || (wc == (wchar_t)0x200e))) + wc = '?'; k2 = wcrtomb (scratch, wc, &mbstate2); scratch[k2] = '\0'; mutt_buffer_addstr (b, scratch);