From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KKznJ-0001nJ-0g for mharc-grub-devel@gnu.org; Mon, 21 Jul 2008 14:07:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKznH-0001lZ-Dz for grub-devel@gnu.org; Mon, 21 Jul 2008 14:07:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKznF-0001ik-LQ for grub-devel@gnu.org; Mon, 21 Jul 2008 14:07:31 -0400 Received: from [199.232.76.173] (port=49990 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKznF-0001iY-Dz for grub-devel@gnu.org; Mon, 21 Jul 2008 14:07:29 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:59864 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKznE-0007qz-Sr for grub-devel@gnu.org; Mon, 21 Jul 2008 14:07:29 -0400 Received: from pinux (131.80.221.87.dynamic.jazztel.es [87.221.80.131]) by mail.pina.cat (Postfix) with ESMTP id 1DE42288F2F2F for ; Mon, 21 Jul 2008 20:07:25 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id 9EACE1E1BE; Mon, 21 Jul 2008 20:07:23 +0200 (CEST) Date: Mon, 21 Jul 2008 20:07:23 +0200 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20080721180723.GC7501@pina.cat> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Home-End keys in menu X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2008 18:07:31 -0000 --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --EVF5PPMfhYS0aIcm Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="home_end.patch" 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) --EVF5PPMfhYS0aIcm--