<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2019: menu_context itches



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 >=
> menu height. Example: Mutt stock 1.5.11, 34 lines menu, 795
> entries, menu_scroll=yes, menu_context=17 (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 >= menu->top + menu->pagelen - c) /* indicator below 
bottom threshold */
   {
     if (option (OPTMENUSCROLL) || (menu->pagelen <= 0))
-      menu->top = menu->current - menu->pagelen + c + 1;
+      menu->top = menu->current - menu->pagelen + c;
     else
       menu->top += (menu->pagelen - c) * ((menu->current - menu->top) / 
(menu->pagelen - c)) - c;
   }


-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.