> What'd I'd like to see is a behavior where the list starts scrolling as > you get within some arbitrary number (2-3 probably) of lines from the > bottom.
You know what? I've wanted this functionality for a long time and i didn't even consciously realize it. Here's a patch. I'm currently using it and haven't seen any problems, but i haven't exactly stress-tested it yet, either.
Index: globals.h =================================================================== RCS file: /home/roessler/cvs/mutt/globals.h,v retrieving revision 3.2 diff -u -r3.2 globals.h --- globals.h 2002/01/24 21:53:19 3.2 +++ globals.h 2002/03/27 16:39:05 @@ -145,6 +145,7 @@ WHERE short ConnectTimeout; WHERE short HistSize; +WHERE short IndexContext; WHERE short PagerContext; WHERE short PagerIndexLines; WHERE short ReadInc; Index: init.h =================================================================== RCS file: /home/roessler/cvs/mutt/init.h,v retrieving revision 3.14 diff -u -r3.14 init.h --- init.h 2002/03/02 12:11:33 3.14 +++ init.h 2002/03/27 16:39:06 @@ -848,6 +848,12 @@ { "indent_str", DT_SYN, R_NONE, UL "indent_string", 0 }, /* */ + { "index_context", DT_NUM, R_NONE, UL &IndexContext, 0 }, + /* + ** .pp + ** This variable controls the number of lines of context that are given + ** when scrolling through the message index. + */ { "index_format", DT_STR, R_BOTH, UL &HdrFmt, UL "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" }, /* ** .pp Index: menu.c =================================================================== RCS file: /home/roessler/cvs/mutt/menu.c,v retrieving revision 3.3 diff -u -r3.3 menu.c --- menu.c 2002/02/13 09:53:33 3.3 +++ menu.c 2002/03/27 16:39:06 @@ -371,18 +371,22 @@ set_option (OPTNEEDREDRAW); menu->redraw |= REDRAW_INDEX; } - else if (menu->current >= menu->top + menu->pagelen) + else if (menu->current >= menu->top + menu->pagelen - IndexContext) { if (option (OPTMENUSCROLL) || (menu->pagelen <= 0)) - menu->top = menu->current - menu->pagelen + 1; + menu->top = menu->current - menu->pagelen + IndexContext + 1; else menu->top += menu->pagelen * ((menu->current - menu->top) / menu->pagelen); menu->redraw |= REDRAW_INDEX; } - else if (menu->current < menu->top) + else if (menu->current < menu->top + IndexContext) { if (option (OPTMENUSCROLL) || (menu->pagelen <= 0)) - menu->top = menu->current; + { + menu->top = menu->current - IndexContext; + if (menu->top < 0) + menu->top = 0; + } else { menu->top -= menu->pagelen * ((menu->top + menu->pagelen - 1 - menu->current) / menu->pagelen);
msg26281/pgp00000.pgp
Description: PGP signature