mirror of git://git.sv.gnu.org/nano.git
Adding M-\ and M-/ for First and Last Line to the help viewer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4778 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
d6ecb969ae
commit
fdec2a1d2d
|
@ -6,6 +6,10 @@
|
|||
* src/*.c: Normalize whitespace around '==' comparison.
|
||||
* configure.ac: Check for the availability of snprintf(),
|
||||
fixes Savannah bug #42070 reported by David Lawrence Ramsey.
|
||||
* src/global.c (shortcut_init), src/help.c (do_help): Add the
|
||||
shortcuts M-\ and M-/ for First Line and Last Line to the help
|
||||
viewer, instead of ^Y and ^V, which are already taken for Page
|
||||
Up and Page Down. Also, stop them from aborting the viewer.
|
||||
|
||||
2014-04-14 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/{proto.h,cut.c,nano.c,text.c}: Remove the unused parameter
|
||||
|
|
16
src/global.c
16
src/global.c
|
@ -835,10 +835,10 @@ void shortcut_init(void)
|
|||
#endif
|
||||
|
||||
add_to_funcs(do_first_line,
|
||||
(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
|
||||
(MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
|
||||
first_line_msg, IFSCHELP(nano_firstline_msg), FALSE, VIEW);
|
||||
add_to_funcs(do_last_line,
|
||||
(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
|
||||
(MMAIN|MHELP|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
|
||||
last_line_msg, IFSCHELP(nano_lastline_msg), TRUE, VIEW);
|
||||
|
||||
add_to_funcs(do_gotolinecolumn_void, (MMAIN|MWHEREIS),
|
||||
|
@ -1179,13 +1179,13 @@ void shortcut_init(void)
|
|||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2,
|
||||
"M-R", regexp_void, 0, FALSE);
|
||||
|
||||
add_to_sclist(MMAIN, "M-\\", do_first_line, 0, TRUE);
|
||||
add_to_sclist(MMAIN, "M-|", do_first_line, 0, TRUE);
|
||||
add_to_sclist(MMAIN, "M-/", do_last_line, 0, TRUE);
|
||||
add_to_sclist(MMAIN, "M-?", do_last_line, 0, TRUE);
|
||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MHELP,
|
||||
add_to_sclist(MMAIN|MHELP, "M-\\", do_first_line, 0, TRUE);
|
||||
add_to_sclist(MMAIN|MHELP, "M-|", do_first_line, 0, TRUE);
|
||||
add_to_sclist(MMAIN|MHELP, "M-/", do_last_line, 0, TRUE);
|
||||
add_to_sclist(MMAIN|MHELP, "M-?", do_last_line, 0, TRUE);
|
||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE,
|
||||
"^Y", do_first_line, 0, TRUE);
|
||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MHELP,
|
||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE,
|
||||
"^V", do_last_line, 0, TRUE);
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
|
|
|
@ -164,13 +164,11 @@ void do_help(void (*refresh_func)(void))
|
|||
} else if (f->scfunc == do_first_line) {
|
||||
if (meta_key)
|
||||
line = 0;
|
||||
break;
|
||||
} else if (f->scfunc == do_last_line) {
|
||||
if (meta_key) {
|
||||
if (line + (editwinrows - 1) < last_line)
|
||||
line = last_line - (editwinrows - 1);
|
||||
}
|
||||
break;
|
||||
/* Abort the help browser. */
|
||||
} else if (f->scfunc == do_exit) {
|
||||
abort = TRUE;
|
||||
|
|
Loading…
Reference in New Issue