Hello,

Last weekend we talked about "menu loop" (wrapping):
http://lists.gnu.org/archive/html/grub-devel/2008-07/msg00319.html

Conclusion: people here don't like it (we could discuss for ages, I
think :-) )

Second proposal that maybe was hidden in so much text: to make it to
work Home and End keys. Patch is attached. Do you need a more formal
changelog for this? Adds Home and End key moving.
Comments are welcomed.

Commend: I think that would be possible to change "case 14" by "case
GRUB_TERM_DOWN"; and "case 16" by "case GRUB_TERM_UP" in normal/menu.c
line 400 aprox. These constants are defined in include/grub/term.h. I
don't send a patch because it's in the same "zone" than attached patch
and it's easy-easy.

Thanks for your patience,

-- 
Carles Pina i Estany            GPG id: 0x8CBDAE64
        http://pinux.info       Manresa - Barcelona
Index: normal/menu.c
===================================================================
--- normal/menu.c	(revision 1718)
+++ normal/menu.c	(working copy)
@@ -405,6 +405,22 @@
 	  
 	  switch (c)
 	    {
+            case GRUB_TERM_HOME:
+	       first=0;
+	       offset=0;
+	       print_entries (menu, first, offset);
+	       break;
+
+	    case GRUB_TERM_END:
+	      offset = menu->size - 1;
+	      if (offset > GRUB_TERM_NUM_ENTRIES - 1)
+		{
+                  first = offset - (GRUB_TERM_NUM_ENTRIES - 1);
+		  offset = GRUB_TERM_NUM_ENTRIES - 1;
+		}
+		print_entries (menu, first, offset);
+	      break;
+
 	    case 16:
 	    case '^':
 	      if (offset > 0)
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to