Make the sidebar live in a proper independent window.
[apps/madmutt.git] / pager.c
diff --git a/pager.c b/pager.c
index e7601db..12d86b7 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1373,24 +1373,18 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
         bodyoffset = statusoffset + 1;
         helpoffset = LINES - 2;
         bodylen = helpoffset - bodyoffset;
-        if (!option (OPTHELP))
-          bodylen++;
       } else {
         helpoffset = 0;
         indexoffset = 1;
         statusoffset = LINES - 2;
-        if (!option (OPTHELP))
-          indexoffset = 0;
         bodyoffset = indexoffset + (IsHeader (extra) ? indexlen : 0);
         bodylen = statusoffset - bodyoffset;
       }
 
-      if (option (OPTHELP)) {
-        SETCOLOR (MT_COLOR_STATUS);
-        wmove (stdscr, helpoffset, SW);
-        mutt_paddstr (COLS-SW, "");
-        SETCOLOR (MT_COLOR_NORMAL);
-      }
+      SETCOLOR (MT_COLOR_STATUS);
+      wmove (stdscr, helpoffset, SW);
+      mutt_paddstr (COLS-SW, "");
+      SETCOLOR (MT_COLOR_NORMAL);
 
       if (Resize != NULL) {
         if ((SearchCompiled = Resize->SearchCompiled)) {
@@ -1573,8 +1567,9 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
       mutt_query_exit ();
       continue;
     }
-    else if (SigWinch) {
-      mutt_resize_screen ();
+
+    if (SigWinch) {
+      ui_layout_resize();
 
       /* Store current position. */
       lines = -1;
@@ -1611,12 +1606,10 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
         redraw = REDRAW_FULL | REDRAW_SIGWINCH;
         ch = 0;
       }
-
-      SigWinch = 0;
-      clearok (stdscr, TRUE);   /*force complete redraw */
       continue;
     }
-    else if (ch == -1) {
+
+    if (ch == -1) {
       ch = 0;
       continue;
     }