[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pager weirdness

From: Colin Watson
Subject: Pager weirdness
Date: Tue, 23 Nov 2010 13:30:02 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

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  <address@hidden>

        * 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 ();


Colin Watson                                       address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]