From db906ea121b179353432d993d69f3c7bc68c92b9 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 25 Feb 2014 21:45:55 +0000 Subject: [PATCH] Making ^G and ^C exit from help, and ^C from the file browser. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 ++++- src/global.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83940d4f..a346e625 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,10 @@ * src/global.c - Correcting some translator comments, removal of a few superfluous blank lines, and some pedantic comment tweaks (mainly adding missing periods and stars). - * src/global.c - Ordering "Prev Word" and "Next Word" better. + * src/global.c - Ordering "Prev Word" and "Next Word" better. + * src/global.c - Make ^G not only call help but also exit from + it, and make ^C also exit from help and from the file browser. + Also remove two redundant shortcut definitions. 2014-02-25 Mike Frysinger * src/Makefile.am - Rename 'INCLUDES' to 'AM_CPPFLAGS', since diff --git a/src/global.c b/src/global.c index dba0fbc9..b47a8226 100644 --- a/src/global.c +++ b/src/global.c @@ -1286,12 +1286,12 @@ void shortcut_init(bool unjustify) add_to_sclist(MMAIN, "M-Z", do_toggle_void, SUSPEND, TRUE); add_to_sclist(MMAIN, "M-$", do_toggle_void, SOFTWRAP, TRUE); #endif + add_to_sclist(MHELP|MBROWSER, "^C", do_exit, 0, TRUE); + add_to_sclist(MHELP, "^G", do_exit, 0, TRUE); add_to_sclist(MGOTOLINE, "^T", gototext_void, 0, FALSE); add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", new_buffer_void, 0, FALSE); add_to_sclist((MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MWHEREISFILE|MGOTODIR|MYESNO|MLINTER), "^C", do_cancel, 0, FALSE); - add_to_sclist(MHELP, "^X", do_exit, 0, TRUE); - add_to_sclist(MHELP, "F2", do_exit, 0, TRUE); add_to_sclist(MWRITEFILE, "M-D", dos_format_void, 0, FALSE); add_to_sclist(MWRITEFILE, "M-M", mac_format_void, 0, FALSE); add_to_sclist(MWRITEFILE, "M-A", append_void, 0, FALSE); -- 2.39.5