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
This commit is contained in:
Benno Schulenberg 2015-04-12 08:44:37 +00:00
parent 99d2358510
commit 4e9b3687ba
2 changed files with 14 additions and 9 deletions

View File

@ -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 <bensberg@justemail.net>
* src/search.c (do_replace_loop): Do not split off the marked region

View File

@ -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);