Rocco Rutte:
[apps/madmutt.git] / recvattach.c
index f770915..30bcb49 100644 (file)
@@ -49,6 +49,8 @@ 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},
@@ -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);
 }