From: Pierre Habouzit Date: Tue, 14 Aug 2007 22:16:21 +0000 (+0200) Subject: simplfications X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=a1fb0030ff5d7a322c64e57f040b32991f9f78fa;ds=sidebyside simplfications Signed-off-by: Pierre Habouzit --- diff --git a/pager.c b/pager.c index eee9b83..e0643b5 100644 --- a/pager.c +++ b/pager.c @@ -1238,8 +1238,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) int bodylen = LINES - 2 - bodyoffset; /* length of displayable area */ MUTTMENU *pager_index = NULL; /* the Pager Index (PI) */ - int indexoffset = 0; /* offset for the PI */ - int indexlen = PagerIndexLines; /* indexlen not always == PIL */ + int indexlen = PagerIndexLines; /* indexlen not always == PIL */ int indicator = indexlen / 3; /* the indicator line of the PI */ int old_PagerIndexLines; /* some people want to resize it * while inside the pager... */ @@ -1296,11 +1295,10 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) indicator = indexlen / 3; - indexoffset = 0; statusoffset = IsHeader (extra) ? indexlen : 0; - bodyoffset = statusoffset + 1; - helpoffset = LINES - 2; - bodylen = helpoffset - bodyoffset; + bodyoffset = statusoffset + 1; + helpoffset = LINES - 2; + bodylen = helpoffset - bodyoffset; SETCOLOR(main_w, MT_COLOR_STATUS); wmove(main_w, helpoffset, 0); @@ -1333,8 +1331,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) } SETCOLOR(main_w, MT_COLOR_NORMAL); - pager_index->offset = indexoffset + 1; - + pager_index->offset = 1; pager_index->pagelen = indexlen - 1; /* some fudge to work out where abouts the indicator should go */ @@ -1447,7 +1444,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) sidebar_draw (); /* print out the pager_index status bar */ menu_status_line (buffer, sizeof (buffer), pager_index, NONULL (Status)); - wmove(main_w, indexoffset + 0, 0); + wmove(main_w, 0, 0); SETCOLOR(main_w, MT_COLOR_STATUS); BKGDSET(main_w, MT_COLOR_STATUS); mutt_paddstr(main_w, getmaxx(main_w), buffer);