--- mutt-1.5.6/init.h.orig	2004-05-11 22:05:42.502006776 +0200
+++ mutt-1.5.6/init.h	2004-05-11 22:07:10.527624848 +0200
@@ -542,6 +542,12 @@
   ** you use `+' or `=' for any other variables since expansion takes place
   ** during the `set' command.
   */
+  { "folder_columns",   DT_NUM, R_NONE, UL &FolderColumns, UL 1 },
+  /*
+  ** .pp
+  ** Specifies the number of folder columns in folder browser.
+  **
+  */
   { "folder_format",	DT_STR,	 R_INDEX, UL &FolderFormat, UL "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f" },
   /*
   ** .pp
--- mutt-1.5.6/globals.h.orig	2004-05-11 22:07:14.085084032 +0200
+++ mutt-1.5.6/globals.h	2004-05-11 22:07:38.718339208 +0200
@@ -143,6 +143,7 @@
 WHERE unsigned short Counter INITVAL (0);
 
 WHERE short ConnectTimeout;
+WHERE short FolderColumns;
 WHERE short HistSize;
 WHERE short PagerContext;
 WHERE short PagerIndexLines;
--- mutt-1.5.6/mutt_menu.h.orig	2004-05-11 22:07:53.327118336 +0200
+++ mutt-1.5.6/mutt_menu.h	2004-05-11 22:08:33.743974040 +0200
@@ -45,6 +45,7 @@
   int menu;	/* menu definition for keymap entries. */
   int offset;	/* which screen row to start the index */
   int pagelen;	/* number of entries per screen */
+  int columns;	/* number of columns in menu */
   int tagprefix;
 
   /* Setting dialog != NULL overrides normal menu behaviour. 
--- mutt-1.5.6/browser.c.orig	2004-05-11 22:09:42.306550944 +0200
+++ mutt-1.5.6/browser.c	2004-05-11 22:13:37.257832920 +0200
@@ -478,12 +478,14 @@
 }
 
 static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title,
-		       size_t titlelen, int buffy)
+		       size_t titlelen, int buffy, int columns)
 {
   char path[_POSIX_PATH_MAX];
 
   menu->max = state->entrylen;
 
+  menu->columns = columns;
+
   if(menu->current >= menu->max)
     menu->current = menu->max - 1;
   if (menu->current < 0)
@@ -638,7 +640,7 @@
   menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER,
     FolderHelp);
 
-  init_menu (&state, menu, title, sizeof (title), buffy);
+  init_menu (&state, menu, title, sizeof (title), buffy, FolderColumns);
 
   FOREVER
   {
@@ -768,7 +770,7 @@
 	    }
 	    menu->current = 0; 
 	    menu->top = 0; 
-	    init_menu (&state, menu, title, sizeof (title), buffy);
+	    init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	    break;
 	  }
 	}
@@ -866,7 +868,7 @@
 	  menu->data = state.entry;
 	  menu->current = 0; 
 	  menu->top = 0; 
-	  init_menu (&state, menu, title, sizeof (title), buffy);
+	  init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	  MAYBE_REDRAW (menu->redraw);
 	}
 	break;
@@ -896,7 +898,7 @@
                   sizeof (struct folder_file) * (state.entrylen - (nentry+1)));
 	      state.entrylen--;
 	      mutt_message _("Mailbox deleted.");
-	      init_menu (&state, menu, title, sizeof (title), buffy);
+	      init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	      MAYBE_REDRAW (menu->redraw);
 	    }
 	  }
@@ -936,7 +938,7 @@
 	    menu->data = state.entry;
 	    menu->current = 0; 
 	    menu->top = 0; 
-	    init_menu (&state, menu, title, sizeof (title), buffy);
+	    init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	  }
 	  else
 #endif
@@ -950,7 +952,7 @@
 	      {
 		menu->current = 0; 
 		menu->top = 0; 
-		init_menu (&state, menu, title, sizeof (title), buffy);
+		init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	      }
 	      else
 	      {
@@ -1013,12 +1015,12 @@
 	      state.imap_browse = 1;
 	      imap_browse (LastDir, &state);
 	      menu->data = state.entry;
-	      init_menu (&state, menu, title, sizeof (title), buffy);
+	      init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	    }
 	    else
 #endif
 	    if (examine_directory (menu, &state, LastDir, NULL) == 0)
-	      init_menu (&state, menu, title, sizeof (title), buffy);
+	      init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	    else
 	    {
 	      mutt_error _("Error scanning directory.");
@@ -1102,7 +1104,7 @@
 #endif
 	else if (examine_directory (menu, &state, LastDir, prefix) == -1)
 	  goto bail;
-	init_menu (&state, menu, title, sizeof (title), buffy);
+	init_menu (&state, menu, title, sizeof (title), buffy, 1);
 	break;
 
       case OP_BUFFY_LIST:
--- mutt-1.5.6/menu.c.orig	2004-05-11 22:13:41.632167920 +0200
+++ mutt-1.5.6/menu.c	2004-05-11 22:56:18.030536296 +0200
@@ -156,11 +156,15 @@
     menu->make_entry (s, l, menu, i);
 }
 
-void menu_pad_string (char *s, size_t n)
+void menu_pad_string (MUTTMENU *menu, char *s, size_t n)
 {
   int shift = option (OPTARROWCURSOR) ? 3 : 0;
   int cols = COLS - shift;
 
+  
+  if ((cols - 1) > (COLS / menu->columns) - shift ) 
+    cols =  (COLS / menu->columns) - shift;
+  
   mutt_format_string (s, n, cols, cols, 0, ' ', s, strlen (s), 1);
   s[n - 1] = 0;
 }
@@ -204,62 +208,78 @@
   menu->redraw &= ~REDRAW_STATUS;
 }
 
+void menu_item_pos (MUTTMENU *menu, int item, int *row, int *col)
+{
+  *row = (item - menu->top) % menu->pagelen;
+  *col = (item - menu->top) / menu->pagelen;
+}
+
 void menu_redraw_index (MUTTMENU *menu)
 {
   char buf[STRING];
-  int i;
-
-  for (i = menu->top; i < menu->top + menu->pagelen; i++)
+  int i, row, col;
+  
+  for (i = menu->top; i < menu->top + (menu->pagelen * menu->columns); i++)
   {
+    menu_item_pos(menu, i, &row, &col);
     if (i < menu->max)
     {
       menu_make_entry (buf, sizeof (buf), menu, i);
-      menu_pad_string (buf, sizeof (buf));
+      menu_pad_string (menu, buf, sizeof (buf));
 
       if (option (OPTARROWCURSOR))
       {
-        attrset (menu->color (i));
-	CLEARLINE (i - menu->top + menu->offset);
+	attrset (menu->color (i));
+	move(menu->offset + row, col * (COLS / menu->columns));
 
 	if (i == menu->current)
 	{
-          attrset (menu->color (i));
-	  ADDCOLOR (MT_COLOR_INDICATOR);
+	  SETCOLOR (MT_COLOR_INDICATOR);
 	  addstr ("->");
-          attrset (menu->color (i));
+	  attrset (menu->color (i));
 	  addch (' ');
 	}
 	else
-	  move (i - menu->top + menu->offset, 3);
+	  move(row + menu->offset, col * COLS / menu->columns + 3);
 
-        print_enriched_string (menu->color(i), (unsigned char *) buf, 1);
-        SETCOLOR (MT_COLOR_NORMAL);          
-      }
+	print_enriched_string (menu->color(i), (unsigned char *) buf, 1);
+	SETCOLOR (MT_COLOR_NORMAL);          
+      }	   
       else
-      {
-        attrset (menu->color (i));
-            
+      { /* !option(OPTARROWCURSOR) */
 	if (i == menu->current)
 	{
-	  ADDCOLOR (MT_COLOR_INDICATOR);
+	  SETCOLOR (MT_COLOR_INDICATOR);
 	  BKGDSET (MT_COLOR_INDICATOR);
 	}
+	else
+	  attrset (menu->color (i));
+
+	move(row + menu->offset, col * (COLS / menu->columns));
+	print_enriched_string (menu->color(i), (unsigned char *) buf,
+	  i != menu->current);
 
-	CLEARLINE (i - menu->top + menu->offset);
-	print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current);
-        SETCOLOR (MT_COLOR_NORMAL);
-        BKGDSET (MT_COLOR_NORMAL);
+	SETCOLOR (MT_COLOR_NORMAL);
+	BKGDSET (MT_COLOR_NORMAL);
       }
     }
     else
-      CLEARLINE (i - menu->top + menu->offset);
+    {
+      if (col == 0)
+      {
+	move(row + menu->offset, col); clrtoeol();
+      }
+    }
   }
   menu->redraw = 0;
+
+      	
 }
 
 void menu_redraw_motion (MUTTMENU *menu)
 {
   char buf[STRING];
+  int row, col;
 
   if (menu->dialog) 
   {
@@ -267,7 +287,8 @@
     return;
   }
   
-  move (menu->oldcurrent + menu->offset - menu->top, 0);
+  menu_item_pos(menu, menu->oldcurrent, &row, &col);
+  move(row + menu->offset, col * (COLS / menu->columns));
   SETCOLOR (MT_COLOR_NORMAL);
   BKGDSET (MT_COLOR_NORMAL);
 
@@ -279,16 +300,18 @@
 
     if (menu->redraw & REDRAW_MOTION_RESYNCH)
     {
-      clrtoeol ();
+      move(row + menu->offset, col * (COLS / menu->columns));
       menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
-      menu_pad_string (buf, sizeof (buf));
-      move (menu->oldcurrent + menu->offset - menu->top, 3);
+      menu_pad_string (menu, buf, sizeof (buf));
+      move (row + menu->offset, col * COLS / menu->columns + 3);
       print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
       SETCOLOR (MT_COLOR_NORMAL);
     }
 
     /* now draw it in the new location */
-    move (menu->current + menu->offset - menu->top, 0);
+    /*move (menu->current + menu->offset - menu->top, 0);*/
+    menu_item_pos(menu, menu->current, &row, &col);	
+    move(row + menu->offset, col * COLS / menu->columns);
     attrset (menu->color (menu->current));
     ADDCOLOR (MT_COLOR_INDICATOR);
     addstr ("->");
@@ -298,18 +321,21 @@
   {
     /* erase the current indicator */
     attrset (menu->color (menu->oldcurrent));
-    clrtoeol ();
+    /*clrtoeol ();*/
+    move(row + menu->offset, col * (COLS / menu->columns));
     menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
-    menu_pad_string (buf, sizeof (buf));
+    menu_pad_string (menu, buf, sizeof (buf));
     print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
 
+    menu_item_pos(menu, menu->current, &row, &col);
     /* now draw the new one to reflect the change */
     menu_make_entry (buf, sizeof (buf), menu, menu->current);
-    menu_pad_string (buf, sizeof (buf));
+    menu_pad_string (menu, buf, sizeof (buf));
     attrset (menu->color (menu->current));
     ADDCOLOR (MT_COLOR_INDICATOR);
     BKGDSET (MT_COLOR_INDICATOR);
-    CLEARLINE (menu->current - menu->top + menu->offset);
+    /*CLEARLINE (menu->current - menu->top + menu->offset);*/
+    move(row + menu->offset, col * (COLS / menu->columns));	
     print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
     SETCOLOR (MT_COLOR_NORMAL);
     BKGDSET (MT_COLOR_NORMAL);
@@ -320,22 +346,24 @@
 void menu_redraw_current (MUTTMENU *menu)
 {
   char buf[STRING];
+  int row, col;
   
-  move (menu->current + menu->offset - menu->top, 0);
   menu_make_entry (buf, sizeof (buf), menu, menu->current);
-  menu_pad_string (buf, sizeof (buf));
+  menu_pad_string (menu, buf, sizeof (buf));
 
+  menu_item_pos(menu, menu->current, &row, &col);
   if (option (OPTARROWCURSOR))
   {
     int attr = menu->color (menu->current);
     attrset (attr);
-    clrtoeol ();
+    /*clrtoeol ();*/
+    move(row + menu->offset, col * (COLS / menu->columns));
     attrset (menu->color (menu->current));
     ADDCOLOR (MT_COLOR_INDICATOR);
     addstr ("->");
     attrset (attr);
     addch (' ');
-    menu_pad_string (buf, sizeof (buf));
+    menu_pad_string (menu, buf, sizeof (buf));
     print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 1);
     SETCOLOR (MT_COLOR_NORMAL);
   }
@@ -344,7 +372,8 @@
     attrset (menu->color (menu->current));
     ADDCOLOR (MT_COLOR_INDICATOR);
     BKGDSET (MT_COLOR_INDICATOR);
-    clrtoeol ();
+    /*clrtoeol ();*/
+    move(row + menu->offset, col * (COLS / menu->columns));
     print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
     SETCOLOR (MT_COLOR_NORMAL);
     BKGDSET (MT_COLOR_NORMAL);
@@ -373,18 +402,18 @@
 
 void menu_check_recenter (MUTTMENU *menu)
 {
-  if (menu->max <= menu->pagelen && menu->top != 0)
+  if (menu->max <= menu->pagelen * menu->columns && menu->top != 0)
   {
     menu->top = 0;
     set_option (OPTNEEDREDRAW);
     menu->redraw |= REDRAW_INDEX;
   }
-  else if (menu->current >= menu->top + menu->pagelen)
+  else if (menu->current >= menu->top + menu->pagelen * menu->columns)
   {
     if (option (OPTMENUSCROLL) || (menu->pagelen <= 0))
-      menu->top = menu->current - menu->pagelen + 1;
+      menu->top = menu->current - menu->pagelen * menu->columns + 1;
     else
-      menu->top += menu->pagelen * ((menu->current - menu->top) / menu->pagelen);
+      menu->top += menu->pagelen * menu->columns * ((menu->current - menu->top) / (menu->pagelen * menu->columns));
     menu->redraw |= REDRAW_INDEX;
   }
   else if (menu->current < menu->top)
@@ -393,7 +422,7 @@
       menu->top = menu->current;
     else
     {
-      menu->top -= menu->pagelen * ((menu->top + menu->pagelen - 1 - menu->current) / menu->pagelen);
+      menu->top -= menu->pagelen * menu->columns * ((menu->top + menu->pagelen - 1 - menu->current) / menu->pagelen);
       if (menu->top < 0)
 	menu->top = 0;
     }
@@ -684,6 +713,7 @@
   p->pagelen = PAGELEN;
   p->color = default_color;
   p->search = menu_search_generic;
+  p->columns = 1;
   return (p);
 }
 
