Binding the unbound Home and End keys to goto_top and goto_bottom in the
Help Viewer and the File Browswer, to mimic the behaviour of these keys in file viewers and web browsers. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5201 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
45772652ff
commit
5b83d7df51
|
@ -2,6 +2,11 @@
|
||||||
* src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish
|
* src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish
|
||||||
a failure to launch the linter from receiving zero parsable lines;
|
a failure to launch the linter from receiving zero parsable lines;
|
||||||
add a new function to glue together the invocation-error string.
|
add a new function to glue together the invocation-error string.
|
||||||
|
* src/global.c (shortcut_init): In the Help Viewer and File Browswer,
|
||||||
|
bind the unbound Home and End keys to goto_top and goto_bottom, to
|
||||||
|
mimic the behaviour of these keys in file viewers and web browsers.
|
||||||
|
Also show ^Y and ^V in the WhereisFile menu instead of M-\ and M-/,
|
||||||
|
for similarity with the WhereIs menu.
|
||||||
|
|
||||||
GNU nano 2.4.1 - 2015.04.14
|
GNU nano 2.4.1 - 2015.04.14
|
||||||
2015-04-13 Benno Schulenberg <bensberg@justemail.net>
|
2015-04-13 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
|
16
src/global.c
16
src/global.c
|
@ -1059,10 +1059,10 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MMOST, "M-Space", do_prev_word_void, 0);
|
add_to_sclist(MMOST, "M-Space", do_prev_word_void, 0);
|
||||||
add_to_sclist(MMOST, "^Space", do_next_word_void, 0);
|
add_to_sclist(MMOST, "^Space", do_next_word_void, 0);
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MMOST, "^A", do_home, 0);
|
add_to_sclist((MMOST & ~MBROWSER), "^A", do_home, 0);
|
||||||
add_to_sclist(MMOST, "Home", do_home, 0);
|
add_to_sclist((MMOST & ~MBROWSER), "Home", do_home, 0);
|
||||||
add_to_sclist(MMOST, "^E", do_end, 0);
|
add_to_sclist((MMOST & ~MBROWSER), "^E", do_end, 0);
|
||||||
add_to_sclist(MMOST, "End", do_end, 0);
|
add_to_sclist((MMOST & ~MBROWSER), "End", do_end, 0);
|
||||||
add_to_sclist(MMAIN|MHELP|MBROWSER, "^P", do_up_void, 0);
|
add_to_sclist(MMAIN|MHELP|MBROWSER, "^P", do_up_void, 0);
|
||||||
add_to_sclist(MMAIN|MHELP|MBROWSER, "Up", do_up_void, 0);
|
add_to_sclist(MMAIN|MHELP|MBROWSER, "Up", do_up_void, 0);
|
||||||
add_to_sclist(MMAIN|MHELP|MBROWSER, "^N", do_down_void, 0);
|
add_to_sclist(MMAIN|MHELP|MBROWSER, "^N", do_down_void, 0);
|
||||||
|
@ -1155,12 +1155,14 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "Down", get_history_newer_void, 0);
|
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "Down", get_history_newer_void, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifndef DISABLE_BROWSER
|
#ifndef DISABLE_BROWSER
|
||||||
|
add_to_sclist(MWHEREISFILE, "^Y", do_first_file, 0);
|
||||||
|
add_to_sclist(MWHEREISFILE, "^V", do_last_file, 0);
|
||||||
add_to_sclist(MBROWSER|MWHEREISFILE, "M-\\", do_first_file, 0);
|
add_to_sclist(MBROWSER|MWHEREISFILE, "M-\\", do_first_file, 0);
|
||||||
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, "M-?", do_last_file, 0);
|
add_to_sclist(MBROWSER|MWHEREISFILE, "M-?", do_last_file, 0);
|
||||||
add_to_sclist(MWHEREISFILE, "^V", do_last_file, 0);
|
add_to_sclist(MBROWSER, "Home", do_first_file, 0);
|
||||||
|
add_to_sclist(MBROWSER, "End", do_last_file, 0);
|
||||||
add_to_sclist(MBROWSER, "^_", goto_dir_void, 0);
|
add_to_sclist(MBROWSER, "^_", goto_dir_void, 0);
|
||||||
add_to_sclist(MBROWSER, "M-G", goto_dir_void, 0);
|
add_to_sclist(MBROWSER, "M-G", goto_dir_void, 0);
|
||||||
add_to_sclist(MBROWSER, "F13", goto_dir_void, 0);
|
add_to_sclist(MBROWSER, "F13", goto_dir_void, 0);
|
||||||
|
@ -1178,6 +1180,8 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MHELP|MBROWSER, "^C", do_exit, 0);
|
add_to_sclist(MHELP|MBROWSER, "^C", do_exit, 0);
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
add_to_sclist(MHELP, "^G", do_exit, 0);
|
add_to_sclist(MHELP, "^G", do_exit, 0);
|
||||||
|
add_to_sclist(MHELP, "Home", do_first_line, 0);
|
||||||
|
add_to_sclist(MHELP, "End", do_last_line, 0);
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MMOST, "^I", do_tab, 0);
|
add_to_sclist(MMOST, "^I", do_tab, 0);
|
||||||
add_to_sclist(MMOST, "^M", do_enter_void, 0);
|
add_to_sclist(MMOST, "^M", do_enter_void, 0);
|
||||||
|
|
Loading…
Reference in New Issue