commit a12e45c35581630209be08c8110869ebc6928eb8
parent 74b9dd68814f3d278286e884fd74e2cb40370743
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 8 Mar 2024 11:37:17 +0100
help: show ^F/^B as primary shortcuts for search, not as secondary
This looks better in the help viewer (^F/^B matching the pair M-B/M-F),
and showing ^F instead of ^W for search in the main edit window will
prevent novice users from using ^W in situations where they shouldn't.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/global.c b/src/global.c
@@ -1188,6 +1188,8 @@ void shortcut_init(void)
add_to_sclist(MMOST|MBROWSER, "Enter", KEY_ENTER, do_enter, 0);
add_to_sclist(MMOST, "^I", '\t', do_tab, 0);
add_to_sclist(MMOST, "Tab", '\t', do_tab, 0);
+ add_to_sclist(MMAIN|MBROWSER|MHELP, "^B", 0, do_search_backward, 0);
+ add_to_sclist(MMAIN|MBROWSER|MHELP, "^F", 0, do_search_forward, 0);
if (ISSET(MODERN_BINDINGS)) {
add_to_sclist((MMOST|MBROWSER) & ~MFINDINHELP, help_key, 0, do_help, 0);
add_to_sclist(MHELP, help_key, 0, do_exit, 0);
@@ -1232,8 +1234,6 @@ void shortcut_init(void)
add_to_sclist(MMOST, "Sh-Del", SHIFT_DELETE, do_backspace, 0);
add_to_sclist(MMOST, "Del", KEY_DC, do_delete, 0);
add_to_sclist(MMAIN, "Ins", KEY_IC, do_insertfile, 0);
- add_to_sclist(MMAIN|MBROWSER|MHELP, "^B", 0, do_search_backward, 0);
- add_to_sclist(MMAIN|MBROWSER|MHELP, "^F", 0, do_search_forward, 0);
add_to_sclist(MMAIN, "^\\", 0, do_replace, 0);
add_to_sclist(MMAIN, "M-R", 0, do_replace, 0);
add_to_sclist(MMOST, "^K", 0, cut_text, 0);