For 1.5.10 [PATCH] Rename menu_move_off to menu_off and negate the involved logic in code and documentation
diff-tree b560acfcf6e89c21ce0b6c4c6654c5557c5eeba6 (from
e8f4a291a81f0a8fb24555f0e36e4b75e2d3f4c8)
Author: Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>
Date: Thu May 26 10:10:14 2005 +0200
[PATCH] Rename menu_move_off to menu_off and negate the involved logic in
code and documentation
Proposed by David Champion <dgc@xxxxxxxxxxxx> in
20050526003359.GW25192@xxxxxxxxxxxxxxxxxxx
b560acfcf6e89c21ce0b6c4c6654c5557c5eeba6 (from
e8f4a291a81f0a8fb24555f0e36e4b75e2d3f4c8)
diff --git a/init.h b/init.h
--- a/init.h
+++ b/init.h
@@ -1103,12 +1103,12 @@ struct option_t MuttVars[] = {
** This variable controls the number of lines of context that are given
** when scrolling through menus. (Similar to ``$$pager_context''.)
*/
- { "menu_move_off", DT_BOOL, R_NONE, OPTMENUMOVEOFF, 0 },
+ { "menu_move", DT_BOOL, R_NONE, OPTMENUMOVE, 0 },
/*
** .pp
- ** When \fIunset\fP, the bottom entry of menus will never scroll up past
+ ** When \fIset\fP, the bottom entry of menus will never scroll up past
** the bottom of the screen, unless there are less entries than lines.
- ** When \fIset\fP, the bottom entry may move off the bottom.
+ ** When \fIunset\fP, the bottom entry may move off the bottom.
*/
{ "menu_scroll", DT_BOOL, R_NONE, OPTMENUSCROLL, 0 },
/*
diff --git a/menu.c b/menu.c
--- a/menu.c
+++ b/menu.c
@@ -374,7 +374,7 @@ void menu_check_recenter (MUTTMENU *menu
int c = MIN (MenuContext, menu->pagelen / 2);
int old_top = menu->top;
- if (!option (OPTMENUMOVEOFF) && menu->max <= menu->pagelen) /* less entries
than lines */
+ if (option (OPTMENUMOVE) && menu->max <= menu->pagelen) /* less entries than
lines */
{
if (menu->top != 0) {
menu->top = 0;
@@ -396,7 +396,7 @@ void menu_check_recenter (MUTTMENU *menu
menu->top -= (menu->pagelen - c) * ((menu->top + menu->pagelen - 1 -
menu->current) / (menu->pagelen - c)) - c;
}
- if (!option (OPTMENUMOVEOFF)) /* make entries stick to bottom */
+ if (option (OPTMENUMOVE)) /* make entries stick to bottom */
menu->top = MIN (menu->top, menu->max - menu->pagelen);
menu->top = MAX (menu->top, 0);
@@ -436,7 +436,7 @@ void menu_next_line (MUTTMENU *menu)
int c = MIN (MenuContext, menu->pagelen / 2);
if (menu->top + 1 < menu->max - c
- && (option(OPTMENUMOVEOFF) || (menu->max > menu->pagelen && menu->top <
menu->max - menu->pagelen)))
+ && ((! option(OPTMENUMOVE)) || (menu->max > menu->pagelen && menu->top <
menu->max - menu->pagelen)))
{
menu->top++;
if (menu->current < menu->top + c && menu->current < menu->max - 1)
diff --git a/mutt.h b/mutt.h
--- a/mutt.h
+++ b/mutt.h
@@ -391,7 +391,7 @@ enum
OPTMARKERS,
OPTMARKOLD,
OPTMENUSCROLL, /* scroll menu instead of implicit next-page */
- OPTMENUMOVEOFF, /* allow menu to scroll past last entry */
+ OPTMENUMOVE, /* allow menu to scroll past last entry */
OPTMETAKEY, /* interpret ALT-x as ESC-x */
OPTMETOO,
OPTMHPURGE,