Blob Blame History Raw
diff -up tin-2.4.5/src/global.c.orig tin-2.4.5/src/global.c
--- tin-2.4.5/src/global.c.orig	2020-12-01 11:51:01.000000000 +0100
+++ tin-2.4.5/src/global.c	2021-02-01 11:43:34.940564498 +0100
@@ -331,7 +331,7 @@ global_mouse_action(
 				return GLOBAL_PAGE_DOWN;
 
 			erase_arrow();
-			currmenu->curr = xrow - INDEX_TOP + currmenu->first;
+			currmenu->curr = MIN(xrow - INDEX_TOP + currmenu->first, currmenu->max - INDEX_TOP + 1);
 			currmenu->draw_arrow();
 
 			if (xmouse == MOUSE_BUTTON_1)