patch-1.3.78 linux/scripts/lxdialog/menubox.c

Next file: linux/CREDITS
Previous file: linux/scripts/lxdialog/inputbox.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.77/linux/scripts/lxdialog/menubox.c linux/scripts/lxdialog/menubox.c
@@ -220,7 +220,7 @@
                        (items[(scroll+choice)*2][0] != ':'));
 
 	    if (key == KEY_UP || key == '-') {
-                if (choice < 6 && scroll) {
+                if (choice < 2 && scroll) {
 	            /* Scroll menu down */
                     scrollok (menu, TRUE);
                     wscrl (menu, -1);
@@ -238,7 +238,9 @@
 		print_item (menu, items[(scroll+choice)*2+1], choice, FALSE,
                                 (items[(scroll+choice)*2][0] != ':'));
 
-                if ((choice > 4) && (scroll + max_choice < item_no)) {
+                if ((choice > max_choice-3) &&
+                    (scroll + max_choice < item_no)
+                   ) {
 		    /* Scroll menu up */
 		    scrollok (menu, TRUE);
                     scroll (menu);


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this