From 20ba559b9fcdf48b875db82ff05ef0e65e25d61e Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 30 Jul 2015 20:15:01 +0000 Subject: [PATCH] Providing feedback for ^Z when suspension is not enabled. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5333 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/nano.c | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4302db44..66898a80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ of the way of invocation) and help texts being unavailable (which is a compile-time decision). * src/global.c (shortcut_init): Change "Justify" to a tag and regroup. + * src/nano.c (do_suspend_void, do_suspend): Provide feedback when + suspension is not enabled; and it cannot be enabled in restricted + mode any longer, so there is no need to check for that any more. 2015-07-29 Benno Schulenberg * src/text.c (do_linter): When the linter is called in restricted mode diff --git a/src/nano.c b/src/nano.c index 624a0094..6e80f6f9 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1288,11 +1288,6 @@ RETSIGTYPE handle_hupterm(int signal) /* Handler for SIGTSTP (suspend). */ RETSIGTYPE do_suspend(int signal) { - if (ISSET(RESTRICTED)) { - show_restricted_warning(); - return; - } - #ifndef DISABLE_MOUSE /* Turn mouse support off. */ disable_mouse_support(); @@ -1324,6 +1319,10 @@ void do_suspend_void(void) { if (ISSET(SUSPEND)) do_suspend(0); + else { + statusbar(_("Suspension is not enabled")); + beep(); + } } /* Handler for SIGCONT (continue after suspend). */ -- 2.39.5