Andreas Krennmair:
authorak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 27 Feb 2005 16:02:55 +0000 (16:02 +0000)
committerak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 27 Feb 2005 16:02:55 +0000 (16:02 +0000)
fix status_line drawing with sidebar enabled.

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

ChangeLog.mutt-ng
muttlib.c
pager.c

index c0181c2..cc3428a 100644 (file)
@@ -1,12 +1,9 @@
 Changes specific to mutt-ng:
 
-2005-02-27
+2005-02-27:
+  * integrated patch to highlight the next mailbox which includes new mail in sidebar
   * makes sidebar fit into screen in the pager
 
-2005-02-27
-  * integrated patch to highlight the next mailbox which includes new mail in
-  sidebar
-
 2005-02-24:
   * Integrated another sidebar fix and a build fix from Rocco Rutte.
   * Implemented feature request that the number of flagged messages is shown in the sidebar
index b7bba57..b01619f 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1026,10 +1026,10 @@ void mutt_FormatString (char *dest,             /* output buffer */
        ch = *src++; /* pad char */
        /* calculate space left on line.  if we've already written more data
           than will fit on the line, ignore the rest of the line */
-       if ( DrawFullLine )
+       if ( DrawFullLine  || option(OPTSTATUSONTOP))
          count = (COLS < destlen ? COLS : destlen);
        else
-         count = ((COLS) < destlen ? (COLS) : destlen);
+         count = ((COLS-SidebarWidth) < destlen ? (COLS - SidebarWidth) : destlen);
        if (count > col)
        {
          count -= col; /* how many columns left on this line */
diff --git a/pager.c b/pager.c
index 312e8e1..95d1f08 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1776,9 +1776,9 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
       draw_sidebar(MENU_PAGER);
       /* print out the index status bar */
       menu_status_line (buffer, sizeof (buffer), index, NONULL(Status));
-      move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)),0);
+      move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)),option(OPTSTATUSONTOP)?0:SidebarWidth);
       SETCOLOR (MT_COLOR_STATUS);
-      mutt_paddstr (COLS, buffer);
+      mutt_paddstr (COLS-(option(OPTSTATUSONTOP)?0:SidebarWidth), buffer);
       SETCOLOR (MT_COLOR_NORMAL);
     }
        /* if we're not using the index, update every time */