Re: mutt/2019: menu_context itches
The following reply was made to PR mutt/2019; it has been noted by GNATS.
From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: Mutt Developers <mutt-dev@xxxxxxxx>, ossi@xxxxxxx
Subject: Re: mutt/2019: menu_context itches
Date: Mon, 31 Oct 2005 11:29:34 +0100
On 2005-10-29 13:55:24 +0200, Alain Bench wrote:
> Thanks Oswald: Reopened. This break-dance effect seems
> to happen when menu height is even and $menu_context * 2 >=3D
> menu height. Example: Mutt stock 1.5.11, 34 lines menu, 795
> entries, menu_scroll=3Dyes, menu_context=3D17 (or more). On
> folder open, I see 17 entries #779-795, cursor on #795.
> Typing once <last-entry> gives 778-795c795.
> Typing again <last-entry> gives back 779-795c795.
> And further <last-entry> toggles between those 2 positions.
> The same break-dance happens with other movements like
> <next-page>, <next-entry>, 795 <jump>, and so on.
The following patch should fix the problem; I'm putting it into CVS:
diff -u -r3.21 menu.c
--- menu.c 17 Sep 2005 20:46:10 -0000 3.21
+++ menu.c 31 Oct 2005 10:29:02 -0000
@@ -387,7 +387,7 @@
else if (menu->current >=3D menu->top + menu->pagelen - c) /* indicator =
below bottom threshold */
{
if (option (OPTMENUSCROLL) || (menu->pagelen <=3D 0))
- menu->top =3D menu->current - menu->pagelen + c + 1;
+ menu->top =3D menu->current - menu->pagelen + c;
else
menu->top +=3D (menu->pagelen - c) * ((menu->current - menu->top) / =
(menu->pagelen - c)) - c;
}
--=20
Thomas Roessler =B7 Personal soap box at <http://log.does-not-exist.org/>.