nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit bc98dbcab4d19ad5b72ffcb19b687d458aad58c3
parent 252bb600364f63ba230c02f0304afdea76a48d7f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 12 Feb 2019 19:01:35 +0100

menus: remove the ^Y and ^V shortcuts from the Search menus

Jumping to the first or last line of the buffer doesn't have anything
to do with searching, so these functions shouldn't be present in the
search menus.  They make perfect sense in the Goto-Line menu, though.

Diffstat:
Msrc/global.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -896,9 +896,9 @@ void shortcut_init(void) add_to_funcs(do_page_down, MMAIN|MHELP, N_("Next Page"), WITHORSANS(nextpage_gist), TOGETHER, VIEW); - add_to_funcs(to_first_line, MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, + add_to_funcs(to_first_line, MMAIN|MHELP|MGOTOLINE, N_("First Line"), WITHORSANS(firstline_gist), TOGETHER, VIEW); - add_to_funcs(to_last_line, MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, + add_to_funcs(to_last_line, MMAIN|MHELP|MGOTOLINE, N_("Last Line"), WITHORSANS(lastline_gist), BLANKAFTER, VIEW); #ifdef ENABLE_MULTIBUFFER @@ -1273,8 +1273,6 @@ void shortcut_init(void) add_to_sclist(MWHEREIS|MREPLACE, "M-R", 0, regexp_void, 0); add_to_sclist(MWHEREIS|MREPLACE, "M-B", 0, backwards_void, 0); add_to_sclist(MWHEREIS|MREPLACE, "^R", 0, flip_replace, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MFINDINHELP, "^Y", 0, to_first_line, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MFINDINHELP, "^V", 0, to_last_line, 0); #ifdef ENABLE_JUSTIFY add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^W", 0, do_para_begin_void, 0); add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^O", 0, do_para_end_void, 0); @@ -1294,6 +1292,8 @@ void shortcut_init(void) add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "Down", KEY_DOWN, get_history_newer_void, 0); } #endif + add_to_sclist(MGOTOLINE, "^Y", 0, to_first_line, 0); + add_to_sclist(MGOTOLINE, "^V", 0, to_last_line, 0); #ifdef ENABLE_BROWSER add_to_sclist(MWHEREISFILE, "^Y", 0, to_first_file, 0); add_to_sclist(MWHEREISFILE, "^V", 0, to_last_file, 0);