From d68e818bc4d5c962093ced51c4d8341fc6aea30d Mon Sep 17 00:00:00 2001 From: Benjamin Poirier Date: Tue, 24 Jul 2012 16:12:03 -0400 Subject: nconf: add u, d command keys in scroll windows They function just like they do in less(1). Also correct some discrepancy between the help text and the code wrt function keys. Signed-off-by: Benjamin Poirier Signed-off-by: Michal Marek --- scripts/kconfig/nconf.c | 6 +++--- scripts/kconfig/nconf.gui.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index d945de5c43a..1704a8562a5 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -83,10 +83,10 @@ static const char nconf_readme[] = N_( "Text Box (Help Window)\n" "--------\n" "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do for those\n" -" who are familiar with less and lynx.\n" +" keys h,j,k,l function here as do , and for\n" +" those who are familiar with less and lynx.\n" "\n" -"o Press , , , or to exit.\n" +"o Press , , , , or to exit.\n" "\n" "\n" "Alternate Configuration Files\n" diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 3b18dd83966..379003c7a2b 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -604,9 +604,11 @@ void show_scroll_win(WINDOW *main_window, switch (res) { case KEY_NPAGE: case ' ': + case 'd': start_y += text_lines-2; break; case KEY_PPAGE: + case 'u': start_y -= text_lines+2; break; case KEY_HOME: @@ -632,10 +634,10 @@ void show_scroll_win(WINDOW *main_window, start_x++; break; } - if (res == 10 || res == 27 || res == 'q' - || res == KEY_F(F_BACK) || res == KEY_F(F_EXIT)) { + if (res == 10 || res == 27 || res == 'q' || + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) break; - } if (start_y < 0) start_y = 0; if (start_y >= total_lines-text_lines) -- cgit v1.2.3