Re: For 1.5.9: menu_move_off (was: Change in behavior <current-middle>)
On Sunday, April 3, 2005 at 12:53:58 PM +0900, Tamotsu Takahashi wrote:
> I think it should be committed to the CVS ASAP, because it's a bugfix.
I agree, feature and fix against several small 1.5.9 bugs. There is
still the vars renaming proposal, attached.
> On Sat, Apr 02, 2005 at 03:04:12PM +0200, Alain Bench wrote:
>> (A) The final page jump also puts cursor on 1, and further
>> <previous-page> errors "You are on the first page."
> you have to make a new option if you are going to change the old
> behavior.
Well, YAV would be 103% pure bloat, so probably not wanted. My point
is that the (A|B) alternative is minor cosmetic preference only, (B) has
no known "hidden" usage (like the $menu_move_off=yes better showing mail
arrival), and that if everyone agrees (A) is better, it could just
replace (B) without mercy. Now advantages of (A):
· One less keypress.
· Cursor move to #1 gives visual notice user reached first page.
· Nuance: Cursor move to #1 gives visual notice the current page is
perhaps not *entirely* new (cases as 4-37 + <previous-page> = 1-34).
· No succesfull <previous-page> doesn't jump page.
OTOH advantages of (B):
· With 1-34 cursor on 27, user is ready to scroll back some lines with
<next-entry> in case he paged up a little too far.
· Legacy behaviour.
Bye! Alain.
--
Mutt 1.2.5 users: Do us all a favour, set in_reply_to="%i" in muttrc, so
threading is not messed up by silly mail servers.
Everybody: Let's burn silly iPlanet mail servers. Dump ashes to
trashcan. And void trashcan.
Against 1.5.9 + patch-1.5.9.tamo.menu_pageup.5, renames:
$menu_context (CB) ==> $menu_indicator_margin
MenuContext ==> MenuIndicatorMargin
$menu_jump_context (TT) ==> $menu_context
MenuJumpContext ==> MenuContext
And adds reference to menu_context in pager_context manual and back.
diff -prud mutt-1.5.9.orig/globals.h mutt-1.5.9/globals.h
--- mutt-1.5.9.orig/globals.h Tue Apr 5 13:46:43 2005
+++ mutt-1.5.9/globals.h Tue Apr 5 14:15:33 2005
@@ -166,7 +166,7 @@ WHERE unsigned short Counter INITVAL (0)
WHERE short ConnectTimeout;
WHERE short HistSize;
WHERE short MenuContext;
-WHERE short MenuJumpContext;
+WHERE short MenuIndicatorMargin;
WHERE short PagerContext;
WHERE short PagerIndexLines;
WHERE short ReadInc;
diff -prud mutt-1.5.9.orig/init.h mutt-1.5.9/init.h
--- mutt-1.5.9.orig/init.h Tue Apr 5 13:46:43 2005
+++ mutt-1.5.9/init.h Tue Apr 5 14:39:25 2005
@@ -1093,17 +1093,18 @@ struct option_t MuttVars[] = {
{ "menu_context", DT_NUM, R_NONE, UL &MenuContext, 0 },
/*
** .pp
- ** This variable controls the number of lines of context that are given
- ** when scrolling through menus. (Similar to ``$$pager_context''.)
- */
- { "menu_jump_context", DT_NUM, R_NONE, UL &MenuJumpContext, 0 },
- /*
- ** .pp
** In menus (eg. index), the number of lines PageUp or PageDown jumps is
** usually the same as the number of menu-items your screen shows. If you
- ** set $$$menu_jump_context to a non-zero number, PageUp or PageDown
+ ** set $$$menu_context to a non-zero number, PageUp or PageDown
** will jump less. For example, the value "1" will let PageDown keep the
** last item of the previous screen as the first item on the next screen.
+ ** Identical to ``$$pager_context'' for the internal pager.
+ */
+ { "menu_indicator_margin", DT_NUM, R_NONE, UL &MenuIndicatorMargin, 0 },
+ /*
+ ** .pp
+ ** This variable controls the number of lines of context that are shown
+ ** around indicator when scrolling through menus.
*/
{ "menu_move_off", DT_BOOL, R_NONE, OPTMENUMOVEOFF, 1 },
/*
@@ -1254,6 +1255,8 @@ struct option_t MuttVars[] = {
** when displaying the next or previous page in the internal pager. By
** default, Mutt will display the line after the last one on the screen
** at the top of the next page (0 lines of context).
+ ** Identical to ``$$menu_context'' for the messages index, folder
+ ** browser, and other menus.
*/
{ "pager_format", DT_STR, R_PAGER, UL &PagerFmt, UL "-%Z- %C/%m:
%-20.20n %s" },
/*
diff -prud mutt-1.5.9.orig/menu.c mutt-1.5.9/menu.c
--- mutt-1.5.9.orig/menu.c Tue Apr 5 13:46:43 2005
+++ mutt-1.5.9/menu.c Tue Apr 5 14:20:51 2005
@@ -371,7 +371,7 @@ void menu_redraw_prompt (MUTTMENU *menu)
void menu_check_recenter (MUTTMENU *menu)
{
- int c = MIN (MenuContext, menu->pagelen / 2);
+ int c = MIN (MenuIndicatorMargin, menu->pagelen / 2);
int old_top = menu->top;
if (!option (OPTMENUMOVEOFF) && menu->max <= menu->pagelen) /* less entries
than lines */
@@ -433,7 +433,7 @@ void menu_next_line (MUTTMENU *menu)
{
if (menu->max)
{
- int c = MIN (MenuContext, menu->pagelen / 2);
+ int c = MIN (MenuIndicatorMargin, menu->pagelen / 2);
if (menu->top + 1 < menu->max - c
&& (option(OPTMENUMOVEOFF) || (menu->max > menu->pagelen && menu->top <
menu->max - menu->pagelen)))
@@ -454,7 +454,7 @@ void menu_prev_line (MUTTMENU *menu)
{
if (menu->top > 0)
{
- int c = MIN (MenuContext, menu->pagelen / 2);
+ int c = MIN (MenuIndicatorMargin, menu->pagelen / 2);
menu->top--;
if (menu->current >= menu->top + menu->pagelen - c && menu->current > 1)
@@ -475,7 +475,7 @@ void menu_prev_line (MUTTMENU *menu)
void menu_length_jump (MUTTMENU *menu, int jumplen)
{
int tmp, neg = (jumplen >= 0) ? 0 : -1;
- int c = MIN (MenuContext, menu->pagelen / 2);
+ int c = MIN (MenuIndicatorMargin, menu->pagelen / 2);
if (menu->max)
{
@@ -518,12 +518,12 @@ void menu_length_jump (MUTTMENU *menu, i
void menu_next_page (MUTTMENU *menu)
{
- menu_length_jump (menu, MAX (menu->pagelen - MenuJumpContext, 0));
+ menu_length_jump (menu, MAX (menu->pagelen - MenuContext, 0));
}
void menu_prev_page (MUTTMENU *menu)
{
- menu_length_jump (menu, 0 - MAX (menu->pagelen - MenuJumpContext, 0));
+ menu_length_jump (menu, 0 - MAX (menu->pagelen - MenuContext, 0));
}
void menu_half_down (MUTTMENU *menu)
--- mutt/PATCHES Tue Nov 6 19:59:33 2001
+++ mutt/PATCHES Tue Nov 6 19:59:42 2001
@@ -1,0 +1 @@
+patch-1.5.9.ab.menu_page_context_and_cursor_margin_proposed_renaming.1