Nico Golde:
authornion <nion@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Wed, 16 Mar 2005 14:12:16 +0000 (14:12 +0000)
committernion <nion@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Wed, 16 Mar 2005 14:12:16 +0000 (14:12 +0000)
- make - SidebarWidth if OPTMBOXPANE is set because then it is clear if the sidebar is visible or not. Otherwise you have to rumour if the value is 0

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@184 e385b8ad-14ed-0310-8656-cc95a2468c6d

handler.c
menu.c

index 5c05b0f..d407495 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1217,13 +1217,18 @@ static void print_flowed_line(char * line, STATE *s,int ql) {
       --width;
     if (width < 0)
       width = MaxLineLength;
-  } else {
-    width = COLS - SidebarWidth - WrapMargin - ql - 1;
+  } 
+  else {
+    if (option(OPTMBOXPANE))
+      width = COLS - SidebarWidth - WrapMargin - ql - 1;
+    else
+      width = COLS - WrapMargin - ql - 1;
+    
     if (option(OPTSTUFFQUOTED))
       --width;
     if (width < 0)
       width = COLS;
-  }
+  } 
 
   /* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */
 
diff --git a/menu.c b/menu.c
index a097c48..8ff8ace 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -158,9 +158,12 @@ static void menu_make_entry (char *s, int l, MUTTMENU *menu, int i)
 void menu_pad_string (char *s, size_t n)
 {
   int shift = option (OPTARROWCURSOR) ? 3 : 0;
-  int cols = COLS - shift - SidebarWidth;
+  int cols
   char* tmpbuf = safe_malloc (n);
-
+  if (option(OPTMBOXPANE))
+    cols = COLS - shift - SidebarWidth;
+  else
+    cols = COLS - shift;
   mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1);
   tmpbuf[n - 1] = 0;
   snprintf(s,n,"%s",tmpbuf); /* overkill */