Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PKswl-0001ZZ-Tu for mharc-grub-devel@gnu.org; Tue, 23 Nov 2010 08:30:11 -0500 Received: from [140.186.70.92] (port=36600 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKswi-0001ZO-VR for grub-devel@gnu.org; Tue, 23 Nov 2010 08:30:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKswh-0007R9-PX for grub-devel@gnu.org; Tue, 23 Nov 2010 08:30:08 -0500 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:34116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKswh-0007PS-L2 for grub-devel@gnu.org; Tue, 23 Nov 2010 08:30:07 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1PKswd-0003hw-S0 for grub-devel@gnu.org; Tue, 23 Nov 2010 13:30:04 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1PKswd-0003UD-00; Tue, 23 Nov 2010 13:30:03 +0000 Date: Tue, 23 Nov 2010 13:30:02 +0000 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20101123133002.GE21862@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Pager weirdness X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2010 13:30:09 -0000 Am I the only one who finds GRUB's pager really strange? I'm used to pagers behaving roughly like 'more' (actually 'less' but never mind that). At the end of a page, you can press Space and you'll get another page of text, or you can press Return and you'll get another line of text. I think most people with experience on Unix-like systems are familiar with this kind of thing. GRUB's pager is pretty much backwards from this. If you press Return, you get another page of text. If you press Space, the comment in grub-core/normal/term.c says that you should get another "one lines" (sic) of text, but in fact you get two more lines. How about something like this? This seems to behave a lot more naturally for me. Am I missing some subtle detail? 2010-11-23 Colin Watson * grub-core/normal/term.c (print_more): Make \r or \n scroll one line, and other keys scroll an entire page (previous handling was for \r and \n to scroll a page and other keys to scroll two lines). === modified file 'grub-core/normal/term.c' --- grub-core/normal/term.c 2010-09-30 19:04:09 +0000 +++ grub-core/normal/term.c 2010-11-23 13:24:33 +0000 @@ -91,16 +91,16 @@ print_more (void) grub_term_restore_pos (pos); grub_free (pos); - /* Scroll one lines or an entire page, depending on the key. */ + /* Scroll one line or an entire page, depending on the key. */ if (key == '\r' || key =='\n') - grub_normal_reset_more (); - else { static struct term_state *state; for (state = term_states; state; state = state->next) - state->num_lines -= 2; + state->num_lines--; } + else + grub_normal_reset_more (); } void Thanks, -- Colin Watson [cjwatson@ubuntu.com]