X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=b01619f6c29984e5ab1277ec10d03dd514531924;hp=6e95088c64c9597a37c9e15e888c4ab12261db53;hb=58fbf95737a7601f6e139e39b9f69d102c7e858d;hpb=f404a0ca916be07049af51a3022baaaaab94def6 diff --git a/muttlib.c b/muttlib.c index 6e95088..b01619f 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1026,10 +1026,10 @@ void mutt_FormatString (char *dest, /* output buffer */ ch = *src++; /* pad char */ /* calculate space left on line. if we've already written more data than will fit on the line, ignore the rest of the line */ - if ( DrawFullLine ) + if ( DrawFullLine || option(OPTSTATUSONTOP)) count = (COLS < destlen ? COLS : destlen); else - count = ((COLS-SidebarWidth) < destlen ? COLS - SidebarWidth : destlen); + count = ((COLS-SidebarWidth) < destlen ? (COLS - SidebarWidth) : destlen); if (count > col) { count -= col; /* how many columns left on this line */ @@ -1042,8 +1042,10 @@ void mutt_FormatString (char *dest, /* output buffer */ wptr += count; col += count; } - if (len + wlen > destlen) + if (wid + wlen > destlen) len = destlen - wlen; + else + len = wid; memcpy (wptr, buf, len); wptr += len; wlen += len; @@ -1469,7 +1471,7 @@ time_t mutt_decrease_mtime (const char *f, struct stat *st) const char *mutt_make_version (void) { static char vstring[STRING]; - snprintf (vstring, sizeof (vstring), "Mutt %s (%s)", + snprintf (vstring, sizeof (vstring), "Mutt-ng %s (%s)", MUTT_VERSION, ReleaseDate); return vstring; }