1
1

Adding shortcut ^L for Refresh to the help viewer,

to be able to position ^X Exit as the very first.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4780 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Benno Schulenberg 2014-04-15 20:01:19 +00:00
родитель 623b1b6b0b
Коммит 5c2b44a48a
3 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -11,6 +11,9 @@
viewer, instead of ^Y and ^V, which are already taken for Page
Up and Page Down. Also, stop them from aborting the viewer.
* src/help.c (do_help): Remove superfluous abortion variable.
* src/global.c (shortcut_init), src/help.c (do_help): Add the
shortcut ^L for Refresh to the help viewer and stop it aborting;
a changed version of patch #7013 from David Lawrence Ramsey.
2014-04-14 Benno Schulenberg <bensberg@justemail.net>
* src/{proto.h,cut.c,nano.c,text.c}: Remove the unused parameter

Просмотреть файл

@ -306,7 +306,7 @@ void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *h
#endif
#ifdef DEBUG
fprintf(stderr, "Added func \"%s\"\n", f->desc);
fprintf(stderr, "Added func %ld (%s) for menus %x\n", (long)func, f->desc, menus);
#endif
}
@ -791,6 +791,12 @@ void shortcut_init(void)
nano_justify_msg, TRUE, NOVIEW);
#endif
#ifndef DISABLE_HELP
add_to_funcs(do_exit, MHELP, exit_msg, nano_exit_msg, FALSE, VIEW);
add_to_funcs(total_refresh, MHELP, refresh_msg, nano_refresh_msg, FALSE, VIEW);
#endif
add_to_funcs(do_page_up, MMAIN|MHELP|MBROWSER,
prev_page_msg, IFSCHELP(nano_prevpage_msg), FALSE, VIEW);
add_to_funcs(do_page_down, MMAIN|MHELP|MBROWSER,
@ -985,7 +991,7 @@ void shortcut_init(void)
IFSCHELP(nano_wordcount_msg), FALSE, VIEW);
#endif
add_to_funcs(total_refresh, (MMAIN|MHELP), refresh_msg,
add_to_funcs(total_refresh, MMAIN, refresh_msg,
IFSCHELP(nano_refresh_msg), FALSE, VIEW);
add_to_funcs(do_suspend_void, MMAIN, suspend_msg,
@ -1062,13 +1068,6 @@ void shortcut_init(void)
}
#endif /* !NANO_TINY */
#ifndef DISABLE_HELP
add_to_funcs(edit_refresh, MHELP,
refresh_msg, nano_refresh_msg, FALSE, VIEW);
add_to_funcs(do_exit, MHELP, exit_msg, IFSCHELP(nano_exit_msg), FALSE, VIEW);
#endif
#ifndef DISABLE_BROWSER
add_to_funcs(do_first_file, (MBROWSER|MWHEREISFILE),
first_file_msg, IFSCHELP(nano_firstfile_msg), FALSE, VIEW);
@ -1255,7 +1254,7 @@ void shortcut_init(void)
add_to_sclist(MWRITEFILE|MINSERTFILE, "^T", to_files_void, 0, FALSE);
add_to_sclist(MINSERTFILE, "^X", ext_cmd_void, 0, FALSE);
add_to_sclist(MMAIN, "^Z", do_suspend_void, 0, FALSE);
add_to_sclist(MMAIN, "^L", total_refresh, 0, TRUE);
add_to_sclist(MMAIN|MHELP, "^L", total_refresh, 0, FALSE);
add_to_sclist(MALL, "^I", do_tab, 0, TRUE);
add_to_sclist(MALL, "^M", do_enter_void, 0, TRUE);
add_to_sclist(MALL, "kenter", do_enter_void, 0, TRUE);

Просмотреть файл

@ -142,9 +142,8 @@ void do_help(void (*refresh_func)(void))
if (!f)
continue;
if (f->scfunc == total_refresh) {
if (f->scfunc == total_refresh) {
total_redraw();
break;
} else if (f->scfunc == do_page_up) {
if (line > editwinrows - 2)
line -= editwinrows - 2;