X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=compose.c;h=2a701db88a36324d03e9a9983af98d0b75b706e3;hp=bb977daad21fe21938c9424be75ff1f11c973cca;hb=198f6eea2ecd25012a1b426027eac13c0d72aaea;hpb=50adaa99ec40c06e557a13394b6f7e62bcc5b9fa diff --git a/compose.c b/compose.c index bb977da..2a701db 100644 --- a/compose.c +++ b/compose.c @@ -133,9 +133,27 @@ static struct mapping_t ComposeNewsHelp[] = { static void snd_entry (char *b, size_t blen, MUTTMENU * menu, int num) { + int old1=DrawFullLine,old2=option(OPTSTATUSONTOP); + + /* + * XXX + * mutt_FormatString is totally broken as it tries to determine + * the max. width of the output string itself which may fail + * (for example, for $status_on_top, many of the format strings + * are as wide as screen but $attach_format is not, etc.) + * + * When $status_on_top is unset, mutt_FormatString() will respect + * sidebar so unset it for compose menu entries by force... ;-( + */ + DrawFullLine=0; + unset_option(OPTSTATUSONTOP); + mutt_FormatString (b, blen, NONULL (AttachFormat), mutt_attach_fmt, (unsigned long) (((ATTACHPTR **) menu->data)[num]), M_FORMAT_STAT_FILE | M_FORMAT_ARROWCURSOR); + + DrawFullLine=old1; + if (old2) set_option(OPTSTATUSONTOP); }