* Pager weirdness
@ 2010-11-23 13:30 Colin Watson
2010-11-23 15:31 ` Seth Goldberg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin Watson @ 2010-11-23 13:30 UTC (permalink / raw)
To: grub-devel
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 <cjwatson@ubuntu.com>
* 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]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Pager weirdness
2010-11-23 13:30 Pager weirdness Colin Watson
@ 2010-11-23 15:31 ` Seth Goldberg
2010-11-23 16:34 ` Jordi Mallach
2010-12-18 17:38 ` Colin Watson
2 siblings, 0 replies; 4+ messages in thread
From: Seth Goldberg @ 2010-11-23 15:31 UTC (permalink / raw)
To: The development of GNU GRUB
+100000 :).
On Nov 23, 2010, at 5:30 AM, Colin Watson <cjwatson@ubuntu.com> wrote:
> 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 <cjwatson@ubuntu.com>
>
> * 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]
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Pager weirdness
2010-11-23 13:30 Pager weirdness Colin Watson
2010-11-23 15:31 ` Seth Goldberg
@ 2010-11-23 16:34 ` Jordi Mallach
2010-12-18 17:38 ` Colin Watson
2 siblings, 0 replies; 4+ messages in thread
From: Jordi Mallach @ 2010-11-23 16:34 UTC (permalink / raw)
To: grub-devel
On Tue, Nov 23, 2010 at 01:30:02PM +0000, Colin Watson wrote:
> Am I the only one who finds GRUB's pager really strange?
Not AT ALL. :)
It reminds me of how some things misbehave when you have to suffer bterm.
--
Jordi Mallach Pérez -- Debian developer http://www.debian.org/
jordi@sindominio.net jordi@debian.org http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pager weirdness
2010-11-23 13:30 Pager weirdness Colin Watson
2010-11-23 15:31 ` Seth Goldberg
2010-11-23 16:34 ` Jordi Mallach
@ 2010-12-18 17:38 ` Colin Watson
2 siblings, 0 replies; 4+ messages in thread
From: Colin Watson @ 2010-12-18 17:38 UTC (permalink / raw)
To: grub-devel
On Tue, Nov 23, 2010 at 01:30:02PM +0000, Colin Watson wrote:
> 2010-11-23 Colin Watson <cjwatson@ubuntu.com>
>
> * 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).
Applied to trunk following an ack from Vladimir on IRC.
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-18 17:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 13:30 Pager weirdness Colin Watson
2010-11-23 15:31 ` Seth Goldberg
2010-11-23 16:34 ` Jordi Mallach
2010-12-18 17:38 ` Colin Watson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).