X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=recvattach.c;h=d0272e331ac3e07c1f4f9ab82e7e73e212e1abc1;hp=f7709158e7d1987fa6a86b9b3e23c3f6437dc1c7;hb=4eaac5c4a87b84ea9ec0668b4e088ac27e2d1106;hpb=d6988dab6bd378ccdf0f17aaa16de8aee1ceaf43 diff --git a/recvattach.c b/recvattach.c index f770915..d0272e3 100644 --- a/recvattach.c +++ b/recvattach.c @@ -49,13 +49,15 @@ static char LastSaveFolder[_POSIX_PATH_MAX] = ""; break; \ } +#define SW (option(OPTMBOXPANE)?SidebarWidth:0) + static struct mapping_t AttachHelp[] = { {N_("Exit"), OP_EXIT}, {N_("Save"), OP_SAVE}, {N_("Pipe"), OP_PIPE}, {N_("Print"), OP_PRINT}, {N_("Help"), OP_HELP}, - {NULL} + {NULL, OP_NULL} }; static int mutt_extract_path (char *filename, char *path) @@ -367,7 +369,8 @@ const char *mutt_attach_fmt (char *dest, static void attach_entry (char *b, size_t blen, MUTTMENU * menu, int num) { - mutt_FormatString (b, blen, NONULL (AttachFormat), mutt_attach_fmt, + int w=(COLS-SW)>blen?blen:(COLS-SW); + mutt_FormatString (b, w, NONULL (AttachFormat), mutt_attach_fmt, (unsigned long) (((ATTACHPTR **) menu->data)[num]), M_FORMAT_ARROWCURSOR); }