From e899168a1d5c552008ad2df4cc4d18caf95e57b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannes=20M=C3=BCller?= <> Date: Wed, 17 Mar 2021 20:42:11 +0100 Subject: [PATCH] more: fix ARROW_DOWN and PAGE_DOWN behaviour to not skip lines Currently ARROW_DOWN and PAGE_DOWN is bound to command 's' (skip lines). But this behaviour is not what the user expects, since at least one line is always missing! Furthermore at the end of the file there is typically this skipping lines message, if the remainder does not fit in a complete screen. This conflicts also with e.g. less and man PAGE_DOWN behaviour. The 'natural' behaviour is binding to more_kc_jump_lines_per_screen. If more is extended to also jump only a specific number of lines forward, this would be even a better binding for ARROW_DOWN. --- text-utils/more.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text-utils/more.c b/text-utils/more.c index bc3d526e04..b61b37a864 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -815,13 +815,13 @@ static struct number_command read_command(struct more_control *ctl) cmd.key = more_kc_backwards; return cmd; } else if (!memcmp(input, ARROW_DOWN, sizeof(ARROW_DOWN))) { - cmd.key = more_kc_skip_forward_line; + cmd.key = more_kc_jump_lines_per_screen; return cmd; } else if (!memcmp(input, PAGE_UP, sizeof(PAGE_UP))) { cmd.key = more_kc_backwards; return cmd; } else if (!memcmp(input, PAGE_DOWN, sizeof(PAGE_DOWN))) { - cmd.key = more_kc_skip_forward_line; + cmd.key = more_kc_jump_lines_per_screen; return cmd; } } -- 2.47.3