From: Chris Allegretta Date: Mon, 18 Dec 2000 05:03:16 +0000 (+0000) Subject: Fix help menu keypad issues X-Git-Tag: v0.9.24~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d1627cffd0e056e0148fd42f555c2ca1e90fe069;p=nano.git Fix help menu keypad issues git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 4b561a8c..cf68ea1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,10 @@ General window when using nohelp toggle (bug discovered by Rocco Corsi). - nano.1, nano.1.html: - Updated man page for -b, -e, -f and expanded explanation for -p. +- winio.c + do_help() + - Force keypad on so F-keys and PageUp/Down will work properly. + Added check for NANO_EXIT_FKEY to loop. - utils.c: new_magicline() - Increment totsize!! We decrement it when we've read a file, diff --git a/proto.h b/proto.h index 22f91b7d..eb8c517e 100644 --- a/proto.h +++ b/proto.h @@ -134,6 +134,7 @@ void search_init_globals(void); void replace_abort(void); void add_to_cutbuffer(filestruct * inptr); void do_replace_highlight(int highlight_flag, char *word); +void keypad_on(int yesno); #ifdef NANO_EXTRA void do_credits(void); #endif diff --git a/winio.c b/winio.c index 3ac39c71..4597d3fb 100644 --- a/winio.c +++ b/winio.c @@ -1180,6 +1180,11 @@ int do_help(void) int i, j, row = 0, page = 1, kbinput = 0, no_more = 0; int no_help_flag = 0; + + /* Oh well, they've asked for the help menu, if the keypad is not on now + we're going to have to turn it on */ + keypad_on(TRUE); + blank_edit(); curs_set(0); blank_statusbar(); @@ -1265,7 +1270,9 @@ int do_help(void) no_more = 1; continue; } - } while ((kbinput = wgetch(edit)) != NANO_EXIT_KEY); + } while ((kbinput = wgetch(edit)) != NANO_EXIT_KEY && + kbinput != NANO_EXIT_FKEY); + if (no_help_flag) { werase(bottomwin); wrefresh(bottomwin);