Commit e1e6c5f6 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

bindings: make the search function rebindable again in help and browser


Adjust to the changed meaning of 'whereis': it is no longer do_search()
but do_search_forward().
Hinted-at-by: default avatarBrand Huntsman <alpha@qzx.com>
No related merge requests found
Showing with 8 additions and 10 deletions
+8 -10
...@@ -165,7 +165,7 @@ char *do_browser(char *path) ...@@ -165,7 +165,7 @@ char *do_browser(char *path)
#else #else
say_there_is_no_help(); say_there_is_no_help();
#endif #endif
} else if (func == do_search) { } else if (func == do_search_forward) {
do_filesearch(); do_filesearch();
} else if (func == do_research) { } else if (func == do_research) {
do_fileresearch(TRUE); do_fileresearch(TRUE);
...@@ -485,7 +485,7 @@ functionptrtype parse_browser_input(int *kbinput) ...@@ -485,7 +485,7 @@ functionptrtype parse_browser_input(int *kbinput)
case 'W': case 'W':
case 'w': case 'w':
case '/': case '/':
return do_search; return do_search_forward;
case 'N': case 'N':
#ifndef NANO_TINY #ifndef NANO_TINY
return do_findprevious; return do_findprevious;
......
...@@ -738,7 +738,7 @@ void shortcut_init(void) ...@@ -738,7 +738,7 @@ void shortcut_init(void)
replace_tag, IFSCHELP(nano_replace_msg), TOGETHER, NOVIEW); replace_tag, IFSCHELP(nano_replace_msg), TOGETHER, NOVIEW);
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
add_to_funcs(do_search, MBROWSER, add_to_funcs(do_search_forward, MBROWSER,
whereis_tag, IFSCHELP(nano_browser_whereis_msg), TOGETHER, VIEW); whereis_tag, IFSCHELP(nano_browser_whereis_msg), TOGETHER, VIEW);
add_to_funcs(do_research, MBROWSER, add_to_funcs(do_research, MBROWSER,
...@@ -757,7 +757,7 @@ void shortcut_init(void) ...@@ -757,7 +757,7 @@ void shortcut_init(void)
add_to_funcs(total_refresh, MHELP, refresh_tag, "x", 0, VIEW); add_to_funcs(total_refresh, MHELP, refresh_tag, "x", 0, VIEW);
add_to_funcs(do_exit, MHELP, close_tag, "x", 0, VIEW); add_to_funcs(do_exit, MHELP, close_tag, "x", 0, VIEW);
add_to_funcs(do_search, MHELP, whereis_tag, "x", 0, VIEW); add_to_funcs(do_search_forward, MHELP, whereis_tag, "x", 0, VIEW);
add_to_funcs(do_research, MHELP, whereis_next_tag, "x", 0, VIEW); add_to_funcs(do_research, MHELP, whereis_next_tag, "x", 0, VIEW);
#endif #endif
...@@ -1093,8 +1093,8 @@ void shortcut_init(void) ...@@ -1093,8 +1093,8 @@ void shortcut_init(void)
add_to_sclist(MMAIN, "F5", 0, do_insertfile_void, 0); add_to_sclist(MMAIN, "F5", 0, do_insertfile_void, 0);
add_to_sclist(MMAIN, "Ins", 0, do_insertfile_void, 0); add_to_sclist(MMAIN, "Ins", 0, do_insertfile_void, 0);
add_to_sclist(MMAIN, "^Q", 0, do_search_backward, 0); add_to_sclist(MMAIN, "^Q", 0, do_search_backward, 0);
add_to_sclist(MMAIN, "^W", 0, do_search_forward, 0); add_to_sclist(MMAIN|MHELP|MBROWSER, "^W", 0, do_search_forward, 0);
add_to_sclist(MMAIN, "F6", 0, do_search_forward, 0); add_to_sclist(MMAIN|MHELP|MBROWSER, "F6", 0, do_search_forward, 0);
add_to_sclist(MMAIN, "^\\", 0, do_replace, 0); add_to_sclist(MMAIN, "^\\", 0, do_replace, 0);
add_to_sclist(MMAIN, "M-R", 0, do_replace, 0); add_to_sclist(MMAIN, "M-R", 0, do_replace, 0);
add_to_sclist(MMAIN, "F14", 0, do_replace, 0); add_to_sclist(MMAIN, "F14", 0, do_replace, 0);
...@@ -1133,8 +1133,6 @@ void shortcut_init(void) ...@@ -1133,8 +1133,6 @@ void shortcut_init(void)
add_to_sclist(MMAIN|MHELP, "M-/", 0, do_last_line, 0); add_to_sclist(MMAIN|MHELP, "M-/", 0, do_last_line, 0);
add_to_sclist(MMAIN|MHELP, "^End", CONTROL_END, do_last_line, 0); add_to_sclist(MMAIN|MHELP, "^End", CONTROL_END, do_last_line, 0);
add_to_sclist(MMAIN|MHELP, "M-?", 0, do_last_line, 0); add_to_sclist(MMAIN|MHELP, "M-?", 0, do_last_line, 0);
add_to_sclist(MHELP|MBROWSER, "^W", 0, do_search, 0);
add_to_sclist(MHELP|MBROWSER, "F6", 0, do_search, 0);
add_to_sclist(MMAIN|MHELP|MBROWSER, "M-W", 0, do_research, 0); add_to_sclist(MMAIN|MHELP|MBROWSER, "M-W", 0, do_research, 0);
add_to_sclist(MMAIN|MHELP|MBROWSER, "F16", 0, do_research, 0); add_to_sclist(MMAIN|MHELP|MBROWSER, "F16", 0, do_research, 0);
#ifndef NANO_TINY #ifndef NANO_TINY
......
...@@ -205,7 +205,7 @@ void do_help(void) ...@@ -205,7 +205,7 @@ void do_help(void)
do_first_line(); do_first_line();
} else if (func == do_last_line) { } else if (func == do_last_line) {
do_last_line(); do_last_line();
} else if (func == do_search) { } else if (func == do_search_forward) {
do_search(); do_search();
bottombars(MHELP); bottombars(MHELP);
} else if (func == do_research) { } else if (func == do_research) {
...@@ -575,7 +575,7 @@ functionptrtype parse_help_input(int *kbinput) ...@@ -575,7 +575,7 @@ functionptrtype parse_help_input(int *kbinput)
case 'W': case 'W':
case 'w': case 'w':
case '/': case '/':
return do_search; return do_search_forward;
case 'N': case 'N':
#ifndef NANO_TINY #ifndef NANO_TINY
return do_findprevious; return do_findprevious;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment