From b991403ce996d58ff7f144f576eabc795aed86d2 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 23 Apr 2014 19:44:21 +0000 Subject: [PATCH] Making the Minus and Space keys work in the help viewer and file browser also when the PrevPage and NextPage functions are bound to meta keys. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4810 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 +++++ src/browser.c | 4 ++-- src/help.c | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43322a4d..471148f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ 2014-04-23 Benno Schulenberg * src/winio.c, src/help.c, src/text.c, src/browser.c: Remove several unneeded double semicolons, and two relic comments. + * src/help.c (parse_help_input), src/browser.c (parse_browser_input): + Make the Minus and Space keys work in the help viewer and file browser + also when the PrevPage and NextPage functions are bound to meta-key + sequences -- searching for these will not find them. So, instead put + in the standard key code. This fixes Savannah bug #42140. 2014-04-22 Benno Schulenberg * src/global.c (shortcut_init): Put the movement keys in the diff --git a/src/browser.c b/src/browser.c index cdad8d5e..1025d310 100644 --- a/src/browser.c +++ b/src/browser.c @@ -551,10 +551,10 @@ void parse_browser_input(int *kbinput, bool *meta_key) if (!*meta_key) { switch (*kbinput) { case ' ': - *kbinput = sc_seq_or(do_page_down, 0); + *kbinput = KEY_NPAGE; break; case '-': - *kbinput = sc_seq_or(do_page_up, 0); + *kbinput = KEY_PPAGE; break; case '?': #ifndef DISABLE_HELP diff --git a/src/help.c b/src/help.c index 6b7ecd61..1ecf0ddb 100644 --- a/src/help.c +++ b/src/help.c @@ -494,10 +494,10 @@ void parse_help_input(int *kbinput, bool *meta_key) switch (*kbinput) { /* For consistency with the file browser. */ case ' ': - *kbinput = sc_seq_or(do_page_down, 0); + *kbinput = KEY_NPAGE; break; case '-': - *kbinput = sc_seq_or(do_page_up, 0); + *kbinput = KEY_PPAGE; break; case 'E': case 'e': -- 2.39.5