diff --git a/doc/sample.nanorc.in b/doc/sample.nanorc.in index b6eebb152fc3514bdc4ea1570a322266c3df4054..725e1bfc5232ce24bd98283f35b70ffa72a08fb4 100644 --- a/doc/sample.nanorc.in +++ b/doc/sample.nanorc.in @@ -269,11 +269,9 @@ ## Key bindings. ## See nanorc(5) (section REBINDING KEYS) for more details on this. ## -## The following five functions are not bound to any key by default. +## The following three functions are not bound to any key by default. ## You may wish to choose different keys than the ones suggested here. # bind ^S savefile main -# bind M-Q findprevious main -# bind M-W findnext main # bind M-B cutwordleft main # bind M-N cutwordright main diff --git a/src/global.c b/src/global.c index 9a8c8f55188133bec985514ded9cb8029842ed9a..c3c9ee573c6beb9a38ba6c51e8b45d84861dd0ab 100644 --- a/src/global.c +++ b/src/global.c @@ -1143,6 +1143,11 @@ void shortcut_init(void) add_to_sclist(MMAIN, "M-\xE2\x86\x90", ALT_LEFT, switch_to_prev_buffer_void, 0); add_to_sclist(MMAIN, "M-\xE2\x86\x92", ALT_RIGHT, switch_to_next_buffer_void, 0); #endif +#ifndef NANO_TINY + add_to_sclist(MMAIN|MHELP, "M-\xE2\x86\x91", ALT_UP, do_findprevious, 0); + add_to_sclist(MMAIN|MHELP, "M-\xE2\x86\x93", ALT_DOWN, do_findnext, 0); +#endif + } else #endif { diff --git a/src/help.c b/src/help.c index 46aff4e70c2f78d4a5ce258eec150bbb0315f592..05fdb92d1c87c2738fb1d07583969bec1bb885d9 100644 --- a/src/help.c +++ b/src/help.c @@ -206,7 +206,10 @@ void do_help(void) } else if (func == do_search) { do_search(); bottombars(MHELP); - } else if (func == do_research) { + } else if (func == do_findprevious) { + do_findprevious(); + currmenu = MHELP; + } else if (func == do_findnext || func == do_research) { do_research(); currmenu = MHELP; #ifndef NANO_TINY @@ -576,8 +579,9 @@ functionptrtype parse_help_input(int *kbinput) case '/': return do_search; case 'N': + return do_findprevious; case 'n': - return do_research; + return do_findnext; case 'E': case 'e': case 'Q': diff --git a/src/winio.c b/src/winio.c index 723868b0a9b424ef5fcb1472f58ce1c07140680f..4fbb30a055be8c8138744e00a7f83f814c760013 100644 --- a/src/winio.c +++ b/src/winio.c @@ -527,6 +527,10 @@ int parse_kbinput(WINDOW *win) return ALT_LEFT; } else if (retval == altright) { return ALT_RIGHT; + } else if (retval == altup) { + return ALT_UP; + } else if (retval == altdown) { + return ALT_DOWN; } else if (retval == shiftaltleft) { shift_held = TRUE; return KEY_HOME;