From 4e9b3687ba21e45e4d699ed0e5d54658d1470f05 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 12 Apr 2015 08:44:37 +0000 Subject: [PATCH] Rebinding ^Y and ^V in the WhereisFile menu to the effective and consistent first_file() and last_file(). git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5191 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/global.c | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4be23837..b30c710b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ * src/browser.c (filesearch_init): Stop M-\ and M-/ in WhereisFile menu (reached via ^R ^T ^W) from doing also an unrequested search after having performed their function. Fixes Savannah bug #44790. + * src/global.c (shortcut_init): Rebind ^Y and ^V in the WhereisFile + menu from the pointless page_up() and page_down() to the effective + first_file() and last_file(). Also unbind some other useless keys. 2015-04-11 Benno Schulenberg * src/search.c (do_replace_loop): Do not split off the marked region diff --git a/src/global.c b/src/global.c index a26ded46..82c82e8b 100644 --- a/src/global.c +++ b/src/global.c @@ -1027,12 +1027,12 @@ void shortcut_init(void) add_to_sclist(MMAIN, "^_", do_gotolinecolumn_void, 0); add_to_sclist(MMAIN, "M-G", do_gotolinecolumn_void, 0); add_to_sclist(MMAIN, "F13", do_gotolinecolumn_void, 0); - add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "^Y", do_page_up, 0); - add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "F7", do_page_up, 0); - add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "PgUp", do_page_up, 0); - add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "^V", do_page_down, 0); - add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "F8", do_page_down, 0); - add_to_sclist(MMAIN|MBROWSER|MHELP|MWHEREISFILE|MLINTER, "PgDn", do_page_down, 0); + add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "^Y", do_page_up, 0); + add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "F7", do_page_up, 0); + add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "PgUp", do_page_up, 0); + add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "^V", do_page_down, 0); + add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "F8", do_page_down, 0); + add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "PgDn", do_page_down, 0); add_to_sclist(MMAIN|MHELP, "M-\\", do_first_line, 0); add_to_sclist(MMAIN|MHELP, "M-|", do_first_line, 0); add_to_sclist(MMAIN|MHELP, "M-/", do_last_line, 0); @@ -1157,11 +1157,13 @@ void shortcut_init(void) #ifndef DISABLE_BROWSER add_to_sclist(MBROWSER|MWHEREISFILE, "M-\\", do_first_file, 0); add_to_sclist(MBROWSER|MWHEREISFILE, "M-|", do_first_file, 0); + add_to_sclist(MWHEREISFILE, "^Y", do_first_file, 0); add_to_sclist(MBROWSER|MWHEREISFILE, "M-/", do_last_file, 0); add_to_sclist(MBROWSER|MWHEREISFILE, "M-?", do_last_file, 0); - add_to_sclist(MBROWSER|MWHEREISFILE, "^_", goto_dir_void, 0); - add_to_sclist(MBROWSER|MWHEREISFILE, "M-G", goto_dir_void, 0); - add_to_sclist(MBROWSER|MWHEREISFILE, "F13", goto_dir_void, 0); + add_to_sclist(MWHEREISFILE, "^V", do_last_file, 0); + add_to_sclist(MBROWSER, "^_", goto_dir_void, 0); + add_to_sclist(MBROWSER, "M-G", goto_dir_void, 0); + add_to_sclist(MBROWSER, "F13", goto_dir_void, 0); #endif add_to_sclist(MWRITEFILE, "M-D", dos_format_void, 0); add_to_sclist(MWRITEFILE, "M-M", mac_format_void, 0); -- 2.39.5