The variable in question is supposed to track string sizes, not string
widths (closes #2882 and #2900).
count = (COLS < destlen ? COLS : destlen);
if (count > col)
{
- count -= col; /* how many columns left on this line */
+ count -= wlen; /* how many byte left for this line's buffer */
mutt_FormatString (buf, sizeof (buf), 0, src, callback, data, flags);
len = mutt_strlen (buf);
wid = mutt_strwidth (buf);
memcpy (wptr, buf, len);
wptr += len;
wlen += len;
- col += mutt_strwidth (buf);
+ col += wid;
}
break; /* skip rest of input */
}