From: Fabrice Bellet Date: Sun, 23 Jul 2017 19:04:15 +0000 (+0200) Subject: Fix truncated formating X-Git-Tag: neomutt-20170907~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04b76ad8f4802f2fbd4f47e5f68f00feb5f70c40;p=neomutt Fix truncated formating This patch fixes the leak of index line attributes on the next line due to the truncation of the output buffer based on terminal number of columns, forgetting to include escapes sequence at the end of the input buffer (#664). --- diff --git a/curs_lib.c b/curs_lib.c index 31d20f7bc..019fd78a4 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -1199,7 +1199,7 @@ void mutt_simple_format(char *dest, size_t destlen, int min_width, int max_width if (w >= 0) { if (w > max_width || (k2 = wcrtomb(scratch, wc, &mbstate2)) > destlen) - break; + continue; min_width -= w; max_width -= w; strncpy(p, scratch, k2);