
Author: Steven A (stevenaaus@yahoo.com)
Patches against grub 0.96 and possibly other version

Enables the menu selection of grub to scroll off the top/bottom of the screen.

Other small changes: 
  changes the scroll up behaviour when screen full
  "  Booting ..." --> "Booting ..."

--- stage2.c.orig	2005-03-21 19:25:50.000000000 +1000
+++ stage2.c	2005-03-21 19:26:22.000000000 +1000
@@ -232,6 +232,11 @@
 	  char *heap, int entryno)
 {
   int c, time1, time2 = -1, first_entry = 0;
+
+  // newentry replaces entryno++ | entryno--
+  // and lets us continue from the top to the bottom & vice versa S.A.
+  int newentry;
+
   char *cur_entry = 0;
 
   /*
@@ -397,6 +402,8 @@
 
 	  /* We told them above (at least in SUPPORT_SERIAL) to use
 	     '^' or 'v' so accept these keys.  */
+
+	  // move the menu selection up S.A.
 	  if (c == 16 || c == '^')
 	    {
 	      if (current_term->flags & TERM_DUMB)
@@ -407,27 +414,38 @@
 	      else
 		{
 		  if (entryno > 0)
-		    {
-		      print_entry (4 + entryno, 0,
-				   get_entry (menu_entries,
-					      first_entry + entryno,
-					      0));
-		      entryno--;
-		      print_entry (4 + entryno, 1,
-				   get_entry (menu_entries,
-					      first_entry + entryno,
-					      0));
-		    }
-		  else if (first_entry > 0)
-		    {
-		      first_entry--;
-		      print_entries (3, 12, first_entry, entryno,
+		    newentry = entryno - 1;
+		  else
+		    if (first_entry > 0)
+		      {
+			first_entry--;
+			print_entries (3, 12, first_entry, entryno,
+				       menu_entries);
+			newentry = 0;
+		      }
+		    else if (num_entries <= 12)
+		      newentry = num_entries - 1;
+		    else
+		      {
+			newentry = 11;
+			first_entry = num_entries - 12;
+			print_entries (3, 12, first_entry, entryno,
 				     menu_entries);
-		    }
+		      }
+
+		  print_entry (4 + entryno, 0,
+			       get_entry (menu_entries,
+					  first_entry + entryno,
+					  0));
+		  entryno = newentry ;
+		  print_entry (4 + entryno, 1,
+			       get_entry (menu_entries,
+					  first_entry + entryno,
+					  0));
 		}
 	    }
-	  else if ((c == 14 || c == 'v')
-		   && first_entry + entryno + 1 < num_entries)
+	  // move menu selection down S.A
+	  else if (c == 14 || c == 'v')
 	    {
 	      if (current_term->flags & TERM_DUMB)
 		entryno++;
@@ -435,11 +453,17 @@
 		{
 		  if (entryno < 11)
 		    {
+
+	      if (first_entry + entryno + 1 < num_entries)
+	        newentry = entryno + 1;
+	      else
+	        newentry = 0;
+
 		      print_entry (4 + entryno, 0,
 				   get_entry (menu_entries,
 					      first_entry + entryno,
 					      0));
-		      entryno++;
+		      entryno = newentry;
 		      print_entry (4 + entryno, 1,
 				   get_entry (menu_entries,
 					      first_entry + entryno,
@@ -450,6 +474,12 @@
 		    first_entry++;
 		    print_entries (3, 12, first_entry, entryno, menu_entries);
 		  }
+		else
+		  {
+		    first_entry = 0;
+		    entryno = 0;
+		    print_entries (3, 12, first_entry, entryno, menu_entries);
+		  }
 		}
 	    }
 	  else if (c == 7)
@@ -718,10 +748,10 @@
   while (1)
     {
       if (config_entries)
-	printf ("  Booting \'%s\'\n\n",
+	printf ("Booting \'%s\'\n\n",
 		get_entry (menu_entries, first_entry + entryno, 0));
       else
-	printf ("  Booting command-list\n\n");
+	printf ("Booting command-list\n\n");
 
       if (! cur_entry)
 	cur_entry = get_entry (config_entries, first_entry + entryno, 1);
